Keeping virtual switches in sync with Google Home

I have a set of lights that I want to turn on and off using my Google home.
I have a virtual device, exposed to Google Home which I invoke by saying "Turn the lower level lights off/on" in doing so all the lower level lights turn off/on.

My problem is that this virtual switch stays off/on after its invocation and when I want to turn the lower level lights off/on again, the virtual switch may be in the wrong state.

How can I optimize this rule?

What are you using in Hubitat to have the virtual device manipulate the actual devices? Rule Machine, Basic Rules, Simple Automation, Room Light, Groups?

Is the issue that when you use the voice command to turn on the lights, then manually turn them off, that the virtual switch is still on?

You could write two rules

Rule 1: When all lights switch off, if the virtual switch is on, turn it off.

Rule 2: When all lights are on, if the virtual switch is off, turn it on.

However this still doesn't handle the case where some lights in the group are on and some are off.

You should also be able to use Room Lighting to do the same thing by grouping the lights into a single activator device and then voice commanding that device. Within Room Lighting you can decide if the activator device shows as on for any lights on or for all lights on.

A potentially simpler strategy with Google home, if it doesn't cause any other issues for you, is to group those lights in a single room in the Google home app. Then you can always voice command all lights in that room to be on or off, regardless of their current state. So if you already have a room called "lower level", make a new room called "basement" (or whatever fits) and put only these lights in that room. "Hey Google, turn on the lights in the basement" will turn on all the lights even if some were already on, and vice versa. If these are the only lights in the "lower level" you're already set... Just make sure they're in that room in Google Home.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.