minor updates

This commit is contained in:
Mahasri Kalavala
2019-05-25 13:28:07 -04:00
parent bf3bb241b5
commit 561ece7fe4
3 changed files with 5 additions and 5 deletions

View File

@@ -361,8 +361,8 @@ automation:
condition:
- condition: template
value_template: >
{%- if states.automation.alert_when_moving.attributes.last_triggered -%}
{{ (as_timestamp(now()) - as_timestamp(states.automation.alert_when_moving.attributes.last_triggered)) > 300 }}
{%- if state_attr('automation.alert_when_moving', 'last_triggered') -%}
{{ (as_timestamp(now()) - as_timestamp(state_attr('automation.alert_when_moving', 'last_triggered'))) > 300 }}
{%- else -%}
true
{%- endif -%}