"virtual switch" sending URL depending if on/off?

I have
a device that can be dim up (brightness) with one URL and dim down with a another
dim up / turn on
http://10.10.10.10:8080/remote?action=BRIGHT&value=100
dim down / turn off
http://10.10.10.10:8080/remote?action=BRIGHT&value=0

I wonder if it would be possible to create some kind of switch in HA when it’s on it should send one URL and when the switch is in off position it should send another URL

how can I do that?

Create shell commands for your two actions. Use these shell commands as the turn_on and turn_off actions in a template switch

Do you have another command you can send to get the state of the device?

1 Like