diff --git a/blueprints/automation/wd-close-weather-notification.yaml b/blueprints/automation/wd-close-weather-notification.yaml index 41328d0..a81b5cf 100644 --- a/blueprints/automation/wd-close-weather-notification.yaml +++ b/blueprints/automation/wd-close-weather-notification.yaml @@ -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"