Toggling lights using a group is useless (for me)

My use case is a doorbell which flashes most of the lights in the house.
Without groups it works fine.
I toggle all lights an even number of times with a short delay between each toggle.
All lights finish in the same state they were at the start. This is vital.

It works, but is cumbersome adding each light device to each toggle action. Groups looks like a great way to solve the problem. But alas they do not fit this use-case.

The docs make it clear how the “All entities” option works, and this makes sense for reading the state of a group, but I can’t help feeling that “toggle” is a special case, where you may need one of two options…

Option 1… (The only behaviour available currently) The currently reported state of the entire group is read (and influenced by the “All entities” setting), this state is toggled, and then this new state is applied to each light in the group. It means that if all the lights in the group are not in sync (which on my case is perfectly valid), then some lights will change state, and others will not, as the toggle action attempts to bring all lights back into the same state.

Option 2… the state of the entire group does not matter, but each light within the group is toggled individually. No attempt is made to bring all lights in sync.

It seems that both use cases are valid in different circumstances.
What would be the chances of either an additional option: “Toggle individually”… Which would allow the existing behaviour to remain.
Or make the “All entities”: false setting toggle each light individually?

Why not capture all the lights current values in a temporary scene. Do your toggling, then set them back using the temporary scene.

Check out this thread:

1 Like

Looks like a good workaround, but seems like more work than simply adding each light to my light.toggle actions!
Put into a script (which I haven’t really played with yet) would allow re-use, so I may give it a go once my current long-winded approach gets too cumbersome.

I suspect my proposed change to the group toggle behaviour would remove the need for temporary scenes in at least some of the cases where they are used.