More Attribute condition changes.

This commit is contained in:
ccostan
2020-09-17 20:09:56 -04:00
parent cdc1a826b5
commit 2219e82166
3 changed files with 65 additions and 36 deletions

View File

@@ -51,13 +51,19 @@ automation:
state: 'disconnect'
for:
minutes: 5
- condition: template
value_template: >
{%- if states.automation.juicebox_selfheal.attributes.last_triggered -%}
{{ (as_timestamp(now()) - as_timestamp(states.automation.juicebox_selfheal.attributes.last_triggered)) > 10000 }}
{%- else -%}
true
{%- endif -%}
- condition: numeric_state
entity_id: automation.juicebox_selfheal
attribute: last_triggered
above: 10000
# - condition: template
# value_template: >
# {%- if states.automation.juicebox_selfheal.attributes.last_triggered -%}
# {{ (as_timestamp(now()) - as_timestamp(states.automation.juicebox_selfheal.attributes.last_triggered)) > 10000 }}
# {%- else -%}
# true
# {%- endif -%}
action:
- service: homeassistant.turn_on