I’m hoping to get some guidance on an exciting project I’m working on. I’d like to set up my Home Assistant to deliver a personalized greeting when either myself or my partner return home. The idea is for the Assistant to say “Welcome Home Andreas” or “Welcome Home Laura”, depending on who is entering the house.
Has anyone here implemented personalized greetings like this? I’m not sure how to do that.
trigger:
- state:
entity_id: person.andreas
to: home
not_from:
- unavailable
- unknown
- state:
entity_id: person.laura
to: home
not_from:
- unavailable
- unknown
condition: []
action:
- wait_for_trigger:
- platform: state
entity_id:
- binary_sensor.front_door
to: "on"
continue_on_timeout: false
timeout:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0
- service: tts.speak
data:
cache: true
media_player_entity_id: media_player.andylaptop_honor
message: >-
Welcome Home {{ (trigger.to_state.name).split(" ")[0] }}
Something like that.
That waits for the state of your person entity to change to home, and then gives you 5 minutes to open the front door. It takes the name of the person that triggered the automation by returning home, and splits it with a " " so that if people are saved with a full name, it will only speak the first name.
Thank you both so much! I’m currently using the Home Assistant app and have installed a Nuki smart lock on my door. With these in place, my plan is to set up the following:
If Nuki is unlocking +. Laura was not at home for over >2 hours, then the Sonos should play an mp3.