blueprint: name: Open Windows/Doors Monitor description: Monitors selected windows/doors and lists the ones that are open. domain: automation input: opening_sensors: name: Window/Door Sensors selector: entity: domain: binary_sensor multiple: true notify_service: name: Notification Service description: Enter the notify service (e.g., notify.mobile_app_phone) default: notify.notify selector: text: 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: "{{ notify_service }}" 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: "{{ notify_service }}" data: title: "Window/Door Status" message: "All selected windows/doors are closed."