Hi all –
I have multiple zigbee water sensors (Aqara) and Sonos speakers around the house. My alert worked for a water leak, unfortunately it happened to be while I was sleeping so I didn’t catch it in time before damage occurred. Enter, my automation to announce a leak on my Sonos speakers.
I currently have an announcement working for one sensor as follows (configured in web interface)
when basement leak sensor -> on, then:
- call service
- script.sonos_say
sonos_entity: group.sonos
volume: 0.7
message: 'Alert, there is a leak in the *basement*'
delay: '00:00:05'
It works great, however, my question is, if I have a group of sensors (group.leak_sensors):
- basment-leak
- kitchen-leak
- utility-leak
Is there a way to make the automation announcement message dynamic using the group (state = on) with templating to use the entity name or assigned area so I don’t need to make a separate automation for each sensor? Could also be applicable to other sensors in my house (like smoke CO)
I’m relatively knowledgable in Home Assistant, but not with template structure. Thanks!