I have some custom greeting automations, but sometimes, my device is not yet registered as home before I open my front door. I’m wondering if there’s a “wait till the condition is true” configuration that might help with this? I just got a door sensor that I thought might make this a bit more efficient than just wifi home presence. This is an example of what I currently have.
- id: '1577056125739'
alias: Say Hi
description: ''
trigger:
- entity_id: binary_sensor.front_door
platform: state
to: 'on'
condition:
- condition: template
value_template: '{{ (as_timestamp(states.sensor.time.last_changed) - as_timestamp(states.person.me.last_changed)) < 300 }}'
- condition: state
entity_id: person.me
state: home
action:
- data_template:
message: '{{ (''Hi There!'', ''Welcome Home'', ''Hows it going?'', ''Whats up buttercup?'', ''Howdy pardner'' )|random }}'
entity_id: media_player.google_home
service: tts.google_say