I have an automation that says “welcome home” whenever the front door opens, but I only want it to trigger when my wife or I actually leave the house and return home, as opposed to just checking the mail. I tried a condition like the below, but for some reason, it seems to always execute:
- condition: template
value_template: >-
{{ (as_timestamp(now()) -
as_timestamp((states.device_tracker.wife_person.last_updated))|int
< 3600 )}}
Any input as to why that doesn’t work would be greatly appreciated!
2 posts - 2 participants