Below the code for a ShellSwitch to control my pihole activity. It turns on and off but the switch doesn’t refresh when pihole is controlled from elsewhere then pimatic.
It refreshes once I edit the switch in the gui, adding and deleting a character there, but not from interval. Any ideas?
"onCommand": "pihole enable",
"offCommand": "pihole disable",
"getStateCommand": "sudo pihole status | grep -c enabled",
"interval": 10000,
"hap": {
"service": "Lightbulb",
"exclude": true
},
"id": "pihole-enabled",
"name": "PiHole enabled",
"class": "ShellSwitch",
"forceExecution": true
},