blueprint: name: Open Windows/Doors Monitor description: Shows all selected windows/doors that are currently open. domain: automation input: opening_sensors: name: Window/Door Sensors description: Select the sensors to monitor selector: entity: domain: binary_sensor multiple: true trigger: - platform: state entity_id: !input opening_sensors action: - variables: open_sensors: > {% set devices = [] %} {% for sensor in opening_sensors %} {% if is_state(sensor, 'on') %} {% set _ = devices.append(states[sensor].name) %} {% endif %} {% endfor %} {{ devices }} - choose: - conditions: "{{ open_sensors | length > 0 }}" sequence: - service: persistent_notification.create data: title: "Open Windows/Doors" message: > The following windows/doors are open: {% for d in open_sensors %} - {{ d }} {% endfor %} - conditions: "{{ open_sensors | length == 0 }}" sequence: - service: persistent_notification.create data: title: "Window/Door Status" message: "All selected windows/doors are closed."