Sync Virtual Switch State


#1

Hi all, here is what I am trying to do.

I have a virtual switch that I use to control a RGBW controller and I’m trying to match the state of both the controller and virtual switch. So if I turn on the actual RGBW control switch, I would like it have the virtual switch match that state, but without activating it (the virtual switch triggers other things besides the lights, which I don’t want to run). Is it possible to do something like change the reporting status of the switch with activating it (both on and off)?

Does that make sense?

Thanks!
-Jason


#2

I don’t see how what you want would work…

Unless you add more criteria.

You could create a piston which ignores the virtual switch turning on or off based on some other conditions, but that virtual switch is still always going to report an “event” back to the ST hub when its state changes. There’s no way to ignore the entire events. They always happen, they always get sent and reported.

Now, like i said, you can choose not to do anything when those events happen…but you’ve got to build all that logic yourself to make that happen.

IF Virtual switch changes to on
AND
It’s NOT Tuesday…
THEN do this
ELSE do nothing…

Something like that…but there’s no way to have the state of the switch change without that event getting reported back to the ST hub…and as soon as it reports back that the state changed, any pistons which were watching for a state change on that switch are going to Trigger.