New Code for Template Fix : #1140

This commit is contained in:
ccostan 2021-11-10 20:57:36 -05:00
parent c0a60577e5
commit 9f028aaa9b
1 changed files with 2 additions and 2 deletions

View File

@ -54,8 +54,8 @@ automation:
- 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 }}
{%- if state_attr('automation.juicebox_selfheal', 'last_triggered')-%}
{{ (as_timestamp(now()) - as_timestamp(state_attr('automation.juicebox_selfheal', 'last_triggered'))) > 10000 }}
{%- else -%}
true
{%- endif -%}