Hello,
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?