blueprints/automation/wd-close-weather-notification.yaml aktualisiert
This commit is contained in:
@@ -83,12 +83,14 @@ action:
|
|||||||
message_template: !input custom_message
|
message_template: !input custom_message
|
||||||
notify_service_name: !input notify_service
|
notify_service_name: !input notify_service
|
||||||
open_entities: >
|
open_entities: >
|
||||||
{{ selected_openings
|
{% set open_list = [] %}
|
||||||
| map('string')
|
{% for ent_id in selected_openings %}
|
||||||
| map('states')
|
{% set state_obj = states(ent_id) %}
|
||||||
| selectattr('state','eq','on')
|
{% if state_obj and state_obj.state == 'on' %}
|
||||||
| map(attribute='attributes.friendly_name')
|
{% set _ = open_list.append(state_obj.attributes.friendly_name) %}
|
||||||
| list }}
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{{ open_list }}
|
||||||
trigger_state: >
|
trigger_state: >
|
||||||
{% if trigger.platform in ['numeric_state','state'] %}
|
{% if trigger.platform in ['numeric_state','state'] %}
|
||||||
{{ trigger.to_state.state }}
|
{{ trigger.to_state.state }}
|
||||||
|
|||||||
Reference in New Issue
Block a user