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.
I’ve got the following automation:
- alias: "Bedroom Light Switch"
trigger:
platform: event
event_type: click
event_data:
entity_id: binary_sensor.switch_158d0001209892
click_type: single
action:
service: homeassistant.toggle
entity_id: group.bedroomlights
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?