Issue with this greeting automation when arrive home automation

problem: it triggers everytime the front door is open when we are home. I can’t work out how to make it only greet once and then ignore the door sensor until the next time we leave.

I am using Life360 for person tracking. Is there a way to create a condition where it’ll only trigger within the first 5 minutes of us arriving home?

alias: Arrive Home
description: ""
trigger:
  - type: opened
    platform: device
    device_id: 0f2a8cf1a6d00ea5f6ba85ab2aeac6ab
    entity_id: binary_sensor.lumi_lumi_sensor_magnet_aq2_opening_2
    domain: binary_sensor
condition:
  - condition: state
    entity_id: device_tracker.wifey
    attribute: place
    state: Home
action:
  - delay:
      hours: 0
      minutes: 0
      seconds: 3
      milliseconds: 0
  - service: tts.cloud_say
    data:
      cache: false
      entity_id: media_player.kitchen_speaker
      message: Hello, Wifey... Welcome home!
mode: single

If you turn the state condition (the device tracker going to the Home state) into the trigger, and then as the first action, you add a wait_for_trigger that waits for what is currently your trigger (the door opening), I think you should get what you are looking for.

1 Like

Thanks for that! I’ll make the change and then test in a couple hours when Wifey gets home from work

@Jasper123 Your suggestion worked. Thank you!

1 Like