I’m not sure how to go about this but I believe it’s possible using the template system. The goal is the following:
Anytime a switch which is a member of group.all_switches changes state either on or off. I want to capture what that device name is, and then compose a notification which contains the device_id and the state it changed to.
For example group.all_switches contains the following entity_id:
“switch.downstairs_accent_lights_switch”,
“switch.downstairs_main_ceiling_lights_switch”, “switch.downstairs_seating_accent_lights_switch”,
Lets say “switch.downstairs_seating_accent_lights_switch” is turned off. I want the automation to fire capture the entity_id of “switch.downstairs_seating_accent_lights_switch” and then send a message of “switch.downstairs_seating_accent_lights_switch”, has turned off. Eventually I’d clean this up with friendly names etc. but for now I just wonder how I can iterate over a group and only alert when a sate change happens for a member within the group. Otherwise I’d imagine I’d have to write an automation rule per switch which sounds unplesant.
That was the tipping point I needed. I realized I’ll never be able to trigger just on the group because as long as one switch is one the status will never change. So it’s a long list of entity IDs for the trigger but a short template for the message.