Logic Flaw with Virtual Switch as a Scene Trigger

Hi

I have been using Virtual Switches as a trigger to initiate action in a scene. However, the trigger only works when the state is changed. Hence, if the switch is already on and you tell it to switch on, nothing would occur. Such circumstance could occur when the virtual switch is out of sync with the scene which it is initiating. For example, a virtual switch is made for all outside landscape lights and it is currently off. The outside landscape lights were manually turned on. Let you want to use the virtual switch to turn everything off since the landscape lights were manually turned on. However, sending an off command to the “off state” virtual switch does nothing since the switch was already off.

An easy resolution for this issue to to be able to define a “null”(or ambigous) state for the Virtual switch which is neither on or off. At the end of the scene, the “null” state would be used to set the Virtual switch. This would force a scene to activate whenever on or off command is sent

maybe have a virtual switch for on and another for off. Have the scene trigger off of either state (have both the switch turning off or turning on as a control for the on scene, the use the second switch to control the off scene) in this way the switch acts more like push button so doesn’t need to understand state.

You could use PLEG to keep the Virtual Switch and landscape lighting in sync … then you will never have this problem.

The trick is when the Virtual Switch and the Lighting are in different states … you set the one with the OLDEST timestamp to the value of the one with the NEWEST timestamp.

This template is used in multiple scenarios:
1) Two Independent Lights as a 3-Way switch
2) Link Two Thermostats to have the same setpoint (either can change the value)
3) …

You could also create a virtual dimmer to achieve your idea. That way you have the states of On, Off, and something in between as your ‘null’

I use virtual switch to trigger scenes with an amazon echo… I have the scene triggered reset the virtual switch state

Sent from my LGUS990 using Tapatalk

[quote=“Dscritch420, post:5, topic:189272”]I use virtual switch to trigger scenes with an amazon echo… I have the scene triggered reset the virtual switch state

Sent from my LGUS990 using Tapatalk[/quote]

Is it correct that you have a virtual switch to turn on "landscape light and another to turn off “landscape light” with the off state for each as the “reset” condition? This is the path I have taken. It is kind of kludgy and fills up my screen full of devices…