Fixed conditional running of notification creation
This commit is contained in:
@ -1600,11 +1600,17 @@ script:
|
|||||||
data:
|
data:
|
||||||
notification_id: "weatheralerts_alert"
|
notification_id: "weatheralerts_alert"
|
||||||
## Create a new persistant notification in the UI for a new alert
|
## Create a new persistant notification in the UI for a new alert
|
||||||
- service: >
|
- if:
|
||||||
{% if states.sensor.weatheralerts.state != '0' %}
|
- condition: template
|
||||||
persistent_notification.create
|
value_template: >
|
||||||
{% endif %}
|
{% if states.sensor.weatheralerts.state != '0' %}
|
||||||
data:
|
true
|
||||||
notification_id: "weatheralerts_alert"
|
{% else %}
|
||||||
message: "{{ message }}"
|
false
|
||||||
title: "{{ title }}"
|
{% endif %}
|
||||||
|
then:
|
||||||
|
- service: persistent_notification.create
|
||||||
|
data:
|
||||||
|
notification_id: "weatheralerts_alert"
|
||||||
|
message: "{{ message }}"
|
||||||
|
title: "{{ title }}"
|
||||||
|
Reference in New Issue
Block a user