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 -%}

View File

@ -86,8 +86,8 @@ automation:
value_template: "{{ states('input_boolean.security_system_alerts') == 'on' }}"
- condition: template
value_template: >
{%- if states.automation.notify_home_security_status_change.attributes.last_triggered -%}
{{ (as_timestamp(now()) - as_timestamp(states.automation.notify_home_security_status_change.attributes.last_triggered)) > 90 }}
{%- if state_attr('automation.notify_home_security_status_change', 'last_triggered') -%}
{{ (as_timestamp(now()) - as_timestamp(state_attr('automation.notify_home_security_status_change', 'last_triggered'))) > 90 }}
{%- else -%}
true
{%- endif -%}

View File

@ -68,7 +68,7 @@ automation:
category: camera
entity_id: "camera.usps_mail_pictures"
attachment:
url: "{{ states.camera.usps_mail_pictures.attributes.entity_picture }}"
url: "{{ state_attr('camera.usps_mail_pictures', 'entity_picture') }}"
content-type: jpg
# Notify USPS packages via TTS. Usually there are no pictures for packages