As the topic title says, when using the homeassistant.toggle (or switch.toggle) service call to operate a group as a whole, it doesn’t actually use the group’s status but the individual items within.
For example, I’ve got all my bedroom lights (2 lights and one switch) in a group called group.bedroomlights to have them all switch on and off simultaneously whether using HA interface or Alexa. I’ve also got a Xiaomi wireless switch next to my bed which I use to control the lights.
Now this works quite well most of the time, but for example when I switch one of the lights in the group off manually (while the group is on), then when I use the wireless button, HA doesn’t use the state of the group to toggle the devices on or off, but instead it actually toggles the states of each device individually, so the on devices turn off, and the off devices turn on.
Am I doing something wrong? Or is this an oversight in the programming?
Thanks for that, I wasn’t aware that it was designed that way, I just assumed that it would control the group as a whole instead of individual items within it.
I guess using a service template is all I need to change to make it work like I want to, since the entitiy_id is always the same (group.bedroomlights).
Yes, that will always work if you are always toggling. If you try to make a switch template though, you’ll want to specify the entities inside the group because turning a group on will do nothing if the group is already on. That’s why I typically do the ‘entity’s in the group’.
Hi all
Would it be possable to do the same with sonoff switches/entities
I have two sonoff wall switches. One at the top of the stairs and one at the bottom. Is it possible to link these two together As it stands if I turn one on then walk upstairs and try to turn the light of it does not work as the switch downstairs has control and visa-versa.
So is it possible to link them all the time or group them so that activating one will always activate the other.