Group switch behaviour - all on/off vs toggle states

Hi all,

I found some unexpected behaviour this morning using the group switch. The logic doesn’t seem right to me, I’m interested in the community thoughts.

Apologies I’m unable to get screenshots currently, so will try to describe clearly below.

Initial State:
Climate Control (Group) {ON}
Living room AC {OFF}
Bedroom AC {ON}
Bedroom Fan {ON}

My wife had two of the group entities {ON}, then hit the group (Climate Control) switch to turn everything off… this didn’t work as expected, it seems to have toggled every entity rather than moving everything to {OFF}:

Final State:
Climate Control (Group) {OFF}
Living room AC {ON} <- unexpected
Bedroom AC {OFF}
Bedroom Fan {OFF}

I’d expect & prefer the group switch to behave as a bulk control (rather than toggling all group entities)… when I switch it ON, any entity that’s currently OFF should change to ON, any entities that were already ON should be unchanged. Similarly, when switching the group OFF, any entities that are currently ON should be switched OFF, any entities that were already OFF should be unchanged.

I think I’ve realised what’s happening… HA is firing an 'OFF" signal to all entities, which annoyingly toggles my Living room AC {ON} (power on/off is a toggle, same command). It’d be nice to have a setting that would prevent that handling, i.e. as per my last paragraph… don’t bother sending an {OFF} to an entity we think is {OFF} already.

Easy, you just create some scripts that have the different scenarios added as conditions, then trigger them all with the switch and only the relevant one will activate.

Might seem a lot of work but it’s only copy/paste change a couple of parameters.

You can simplify into one script using if/elifs but probably easier to do them separately first to get your head around it.

1 Like