I have a rule that turns off all the lights in my garage when I press the main light switch off. It functions perfectly, but only if the main lights are already on. If I press off when the main lights are already off, the workbench and other lights will remain on. These are Lutron Caseta switches.
I do not want to mirror the main switch, only the off state. Do I need to create a virtual switch or virtual switch driver to hold/send the state of the main lights, so that the rules can be triggered on that event instead?
Being new to the Hubitat, I want to make sure there isn't a more common solution to this.
What you want to do would work with a Lutron Pico, but I don't think it will work with a Caséta switch. I'm not at home right now, but I don't think that Caséta switches will send a physical "off" event if the switch is already off.
I'll update this post after testing it when I go home.
This is simple to do.
But I'm not sure how you'd trigger an event selectively by storing the state of your main lights in a virtual switch.
I use a scene in Lutron that is assigned with an integration. I then use a pico command to turn that scene off so it doesn't matter the state of any switch in that scene, all switches/dimmers turn off. This includes turning off everything else in the house. (Scene 6 includes all lights in the house)
Yup, in the Lutron ecosystem what @user1009 wants does require a Pico. However, with switches that function as button controllers (like offerings from iNovelli and Zooz), the switch itself could trigger the "all off" independent of its own state.
This all makes sense, as the off press does not register as an event on the Hubitat unless the switch was already on. I have a spare pico I can use instead, and mount it next to the main switch, or replace the main switch entirely with a pico and drive everything through the button presses.