Toggle Light On/OFF


#1

Is there and easy way to set up a virtual switch to toggle light on and off. Ive created a momentary virtual switch from the IDE. But im not finding a good way to link everything together.

I want to press the virtual button and it turn the light on. I want to press the same button again and it turn the light off.


#2

If virtual button is pressed
Then
Using lights
Toggle
End if


#3

I dont see and option for pressed. its either on or off based on status. however, I was able to get a Simulated press button to work with Toggle finally. Turns out there was an issue with my device handler for the button I was using.


#4

Sorry when you said button it threw me off. Did you get a working solution or still need help?


#5

Yes after playing with it a bit i have a working solution. I have momentary simulated button. When I press it it reads as switch on and toggles the lamp. When I press it again it reads as switch off and toggles the lamp. So no I just press the button until I get the desired result. I built this for Harmony button on my remote. there is an Begin and end sequence but end sequence never seems to work and turn off lamp. This was my solution ad works great.