Added in a condition to make sure Rainy Day Automation doesn't trigger more than ~3 hours at a time. #95

This commit is contained in:
ccostan 2020-06-07 14:07:19 -04:00
parent 2e72549d1b
commit f9094e57d4
1 changed files with 7 additions and 0 deletions

View File

@ -45,6 +45,13 @@
- condition: state
entity_id: group.family
state: 'home'
- condition: template # Only run once every ~3 hours tops.
value_template: >
{%- if states.automation.dark_house_little_extra_light.attributes.last_triggered -%}
{{ (as_timestamp(now()) - as_timestamp(states.automation.dark_house_little_extra_light.attributes.last_triggered)) > 10000 }}
{%- else -%}
true
{%- endif -%}
action:
- service: light.turn_on