mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-18 23:06:58 +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: template
|
||||
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:
|
||||
- service: NOTIFICATION_SERVICE
|
||||
data:
|
||||
|
Loading…
x
Reference in New Issue
Block a user