From 9f028aaa9b28a9ab3d9908d004021b79a0fcabd1 Mon Sep 17 00:00:00 2001 From: ccostan Date: Wed, 10 Nov 2021 20:57:36 -0500 Subject: [PATCH] New Code for Template Fix : #1140 --- config/packages/juicenet.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/packages/juicenet.yaml b/config/packages/juicenet.yaml index b4a04a12..9804ffef 100755 --- a/config/packages/juicenet.yaml +++ b/config/packages/juicenet.yaml @@ -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 -%}