🏡 Personalized Welcome Home Affirmations with Home Assistant

:microphone: Home Assistant Voice: Personalized Welcome Home Affirmation System

I built this automation for my wife using the new Home Assistant Voice system, and it’s honestly one of the most joyful things in our home. Every time she walks through the door, Home Assistant plays a random, affirming, sometimes hilarious message out loud and sends it to her phone. It’s a mix of heartfelt love notes and fabulous drag-queen-level praise—from “You bring warmth and love wherever you go” to “You didn’t come to play, you came to SLAY!”

It uses Home Assistant’s local TTS engine (Piper) and a Home Assistant Voice media player to speak naturally and instantly. The result? A warm, funny, affirming moment that celebrates her entrance—and she absolutely loves it.


:repeat: Flow: How It Works

  1. The door opens (triggered by a binary contact sensor).

  2. Home Assistant checks:

  • Is the person currently marked as home?
  • Is the welcome message toggle (input_boolean) turned ON?
  1. If both conditions are met:
  • It turns OFF the toggle immediately to prevent the greeting from repeating until reset.
  • It saves the current volume level of the speaker (so it can be restored later).
  • It sets the speaker volume to 1.0 for maximum clarity.
  • It delays for 2 seconds to ensure the volume change has taken effect.
  • It randomly selects an affirmation from a large, pre-defined list of sweet, positive, and fabulous messages.
  • It uses TTS (Text-to-Speech) via a service like Piper to speak the affirmation aloud using a Home Assistant Voice-connected media player.
  • It sends the same message to the person’s phone via the mobile app as a notification.
  • It delays for 8 seconds to give the TTS message time to finish playing.
  • It restores the speaker to its previous volume level (so you’re not left with a loud speaker afterward).
  1. A second automation is required to turn the toggle back ON, which resets the system for the next arrival.
  • This second automation is triggered when the person leaves home.

:wrench: How to Set It Up

1. Add the Required Helpers & Entities

  • A door sensor (e.g., binary_sensor.front_door_contact_sensor)
  • A person entity (e.g., person.candace)
  • A media player that supports Home Assistant Voice (e.g., ESP32-based speaker)
  • A TTS service (like tts.piper)
  • A mobile app notification target
  • An input_boolean (e.g., input_boolean.welcome_message_enabled) created through Settings → Devices & Services → Helpers

2. Automation #1 — Play Welcome Message

alias: Voice - Welcome Home
description: Greet a specific person with a unique welcome message when they arrive home
trigger:
  - platform: state
    entity_id: binary_sensor.front_door_contact_sensor
    from: "off"
    to: "on"
condition:
  - condition: and
    conditions:
      - condition: state
        entity_id: person.placeholder_name
        state: home
      - condition: state
        entity_id: input_boolean.welcome_message_enabled
        state: "on"
action:
  - action: input_boolean.turn_off
    target:
      entity_id: input_boolean.welcome_message_enabled
  - variables:
      previous_volume: >
        {{ state_attr('media_player.voice_assistant_speaker', 'volume_level') }}
  - action: media_player.volume_set
    target:
      entity_id: media_player.voice_assistant_speaker
    data:
      volume_level: 1
  - delay:
      seconds: 2
  - variables:
      welcome_message: >-
        {% set affirmations = [
          "You look beautiful today.",
          "Way to be awesome.",
          ...
          "You didn’t come to play, you came to SLAY!"
        ] %} Welcome home, {{ user_friendly_name('person.placeholder_name') }}! {{ affirmations | random }}
  - action: tts.speak
    target:
      entity_id: tts.text_to_speech_service
    data:
      cache: true
      media_player_entity_id: media_player.voice_assistant_speaker
      message: "{{ welcome_message }}"
  - action: notify.mobile_app_user_device
    data:
      title: "❤️"
      message: "{{ welcome_message }}"
  - delay:
      seconds: 8
  - action: media_player.volume_set
    target:
      entity_id: media_player.voice_assistant_speaker
    data:
      volume_level: "{{ previous_volume }}"
mode: single

3. Automation #2 — Reset Welcome Message

This automation is required. It re-enables the welcome message toggle when the person leaves home, ensuring the greeting is ready for their next arrival.

alias: Reset Welcome Message
description: Re-enable the welcome message when the person leaves home
trigger:
  - platform: state
    entity_id: person.placeholder_name
    from: home
    to: not_home
action:
  - service: input_boolean.turn_on
    target:
      entity_id: input_boolean.welcome_message_enabled
mode: single

:white_check_mark: Summary

This setup makes your smart home feel warm, welcoming, and emotionally intelligent. It’s not just automation—it’s affection, humor, and love baked into your daily routine.

Let me know if you’d like please - if there’s interest, I can try making this into a blueprint.

3 Likes

how do you track your wife?

1 Like

I use the HA App on our phones with geolocation plus have BLE setup

2 Likes

When making the welcome message random, how would you ensure it didn’t repeat the previous message? Thanks.

1 Like

A blue print would be awesome.
Though I think I’ll have to run mine via the alexa media player integration…till I find some sort of speaker set up for HA.

1 Like

how do you use ble?

1 Like
{% set options = affirmations | reject('equalto', last) | list %}

What it does:

  • affirmations is your list of possible welcome messages.
  • last is the previous message (from input_text.last_welcome_message).
  • reject('equalto', last) removes the last message from the list.
  • | list turns it back into a usable list.

Then, it picks from this filtered list:

{% set new_msg = options | random %}

This ensures the new message won’t be the same as the last one.

1 Like

I think they mean the person must have a Bluetooth device on them and then they most likely track the MAC address of the Bluetooth device to help create an if statement that validate the person is home

HA app for location and input_boolean to track when home or left home