blueprints/automation/wd-close-weather-notification.yaml aktualisiert
This commit is contained in:
@@ -12,20 +12,14 @@ blueprint:
|
||||
multiple: true
|
||||
notify_service:
|
||||
name: Notification Service
|
||||
description: Service to send notifications
|
||||
default: persistent_notification.create
|
||||
description: Select a notify service
|
||||
selector:
|
||||
action: {}
|
||||
entity:
|
||||
domain: notify
|
||||
|
||||
trigger:
|
||||
# Template trigger that fires when any selected sensor changes
|
||||
- platform: template
|
||||
value_template: >
|
||||
{% for sensor in opening_sensors %}
|
||||
{% if is_state(sensor, 'on') %}
|
||||
true
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
- platform: state
|
||||
entity_id: !input opening_sensors
|
||||
|
||||
action:
|
||||
- variables:
|
||||
@@ -43,15 +37,15 @@ action:
|
||||
sequence:
|
||||
- service: !input notify_service
|
||||
data:
|
||||
title: "Open Windows/Doors"
|
||||
message: >
|
||||
The following windows/doors are open:
|
||||
Open windows/doors:
|
||||
{% for d in open_sensors %}
|
||||
- {{ d }}
|
||||
{% endfor %}
|
||||
title: "Open Windows/Doors"
|
||||
- conditions: "{{ open_sensors | length == 0 }}"
|
||||
sequence:
|
||||
- service: !input notify_service
|
||||
data:
|
||||
title: "Window/Door Status"
|
||||
message: "All selected windows/doors are closed."
|
||||
title: "Window/Door Status"
|
||||
|
||||
Reference in New Issue
Block a user