I’ve got a room with two lights, one on a wall switch and one on a dimmer module. I would like to be able to use the wall switch to toggle the dimmer conditionally. So, if the wall switch is already on and I press the On switch, toggle the state of the dimmer module.
I know I can make a scene that performs Luup code when a switch is pressed, but I don’t know how to tell if the light was already on before the switch was pressed. Is this possible?