Hi! I'm having troubles writing what I thought it would be a very easy automation.
I want to have a notification on my Echo Show when my GF leaves work, so I can start preparing coffee for when she gets home.
I want the automation to trigger ONLY if she's been at work for at least 1 hour, and then leaves, so
- person.girlfriend = Workplace --> 1 or more hours passed --> person.girlfriend = Away --> TRIGGER AUTOMATION
- person.girlfriend = Workplace --> person.girlfriend = Away --> DOES NOT TRIGGER (maybe she passed next to the workplace with the car, I don't want random notifications triggering while I'm smart working at home)
I was doing something like this
alias: Exit from work after at least 1 hour
description: Exit from work after at least 1 hour
triggers:
- entity_id: person.gf
from: Workplace
to: Away
trigger: state
conditions:
- condition: template
value_template: >
{{ (as_timestamp(now()) - as_timestamp(states.person.gf.last_changed)) >
3600 }}
actions:
- action: notify.alexa_media_echo_show
data:
message: "\"GF is out of work!\""
data:
type: announce
mode: single
but that of course isn't working 😦 any idea?