mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 15:26:59 +00:00
Update condition by adding check (#8516)
Adding condition check > 0 to prevent action trigger the next day at 19:00 ("states.sensor.rova_garbage_gft.state" is going negative so value is smaller then 43200).
This commit is contained in:
parent
f7ccde5337
commit
3546e989e9
@ -91,6 +91,8 @@ automation:
|
|||||||
condition:
|
condition:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{% if (as_timestamp(states.sensor.rova_garbage_gft.state) - as_timestamp(now())) < 43200 %}true{% endif %}"
|
value_template: "{% if (as_timestamp(states.sensor.rova_garbage_gft.state) - as_timestamp(now())) < 43200 %}true{% endif %}"
|
||||||
|
- condition: template
|
||||||
|
value_template: "{% if (as_timestamp(states.sensor.rova_garbage_gft.state) - as_timestamp(now())) > 0 %}true{% endif %}"
|
||||||
action:
|
action:
|
||||||
- service: NOTIFICATION_SERVICE
|
- service: NOTIFICATION_SERVICE
|
||||||
data:
|
data:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user