alias: "Alert that something is open and the HVAC equipment is on" id: automation_something_open_hvac_on triggers: platform: state entity_id: binary_sensor.something_open_hvac_on from: "off" to: "on" action: - service: notify.mobile_app_pixel_7 data: message: >- The following are open: "{{ dict((states|selectattr('entity_id', 'in', state_attr('group.my_hvac_affecting_openings', 'entity_id'))|list)|groupby('state'))['on']|map(attribute='name')|list|join(', ') }}" data: channel: "Alerts" importance: high actions: - action: "ALARM" # The key you are sending for the event title: "Sound Alarm" # The button title - action: "URI" title: "Adjust Thermostat" uri: "entityId:climate.thermostat"