Help needed with http bnding

I have defined one switch with the http binding:

Switch   switch_pihole_enable		  "Status"		                    <status>    (group_PiHole)   {channel="http:url:pihole:PiHole_Switch"}

Type switch : PiHole_Switch "Status [%s]" [ commandExtension="%2$s", onValue="?enable&auth=xxxx", offValue="?disable&auth=xxx" ]

So I can switch the pihole on and off.

How can I set the switch by the api to on (statues=enable) and off (status=disable) by using the json value of “status”?

  "status": "enabled",

Can you help me?

First question: What version of openHAB?

Here’s my solution:

@Bruce_Osborne Oh 3.1m3

1 Like

Sorry I have not yet worked with 3.1 Milestones