Welcome Automation for Google Mini: A Family-Friendly Solution

Hey everyone, I wanted to share my recent project to create a welcoming automation for my wife when she comes home. It’s been a fun challenge and I thought I’d document my journey in case anyone else is looking to do something similar.

So, the goal was simple: have my Google Mini greet my wife when she arrives home. The trigger is her phone connecting to our WiFi, which happens as soon as she gets in the driveway. Easy enough, right? But here’s where it got interesting.

I set up the automation to wait until the door opens before sending the greeting. The idea was to avoid any accidental triggers, like if she’s just passing by. But here’s the catch: she found it a bit annoying if she was only out for a short while. So, I needed a way to only trigger the greeting if she had been away for at least an hour.

After some research and tweaking, I figured out how to add a condition that checks how long she was away before the automation fires. It’s all done within the automation editor in Home Assistant 2024.2. The key was using the last_changed attribute of the device_tracker entity to calculate the time elapsed since she was last home.

Here’s a quick breakdown of how I set it up:

  1. Trigger: Device tracker for my wife’s phone goes from not_home to home.
  2. Condition: Check if the time since she was last home is greater than 1 hour.
  3. Action: If the condition is met, the Google Mini sends a personalized greeting.

The result? A much happier wife who only gets greeted when she’s actually coming home for the evening. It might seem like a small thing, but it’s the little touches that make home automation so rewarding.

If anyone has tips on optimizing this further or alternative approaches, I’d love to hear them! Happy automating everyone! :rocket: