I have set up a virtual switch which controls 2 devices which are discrete On and Discrete off for an x10 light switch. i am trying to use the virtual switch to combine the two discrete on and discrete off switch to become 1 switch.
I created a virtual switch (using Alexa Virtual Switch Creator) called Theater Light Virtual.
I created 2 Core pistons:
The first is Theater On:
If Theater Light Virtual changes to On, Then Turn on Theater Light On.
Second one is Theater Off:
If Theater Light Virtual changes to off, then Turn on Theater Light Off.
Well it works, but only the first time (or depends on the original state of Theater Light On and Theater Light Off).
If Theater Light On is already on for some reason, and I try to turn Theater Light Virtual on, it won’t work. Same thing goes if Theater Light Off is on and I try to turn Theater Light Virtual off, it won’t work.
I also tried instead of turning on Theater Light On to toggle and still didn’t work.
i think my problem is that these are not 2 way devices so ST doesn’t know if the light is already on or off.
How do i change the if then to something like:
If Theater Light virtual has been pressed (whether it is the on or off button) and the state is On,
then Turn on Theater Light On.
If Theater Light virtual has been pressed (whether it is the on or off button) and the state is Off,
then Turn on Theater Light Off.