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