Optimizing Presence Detection Automation in Home Assistant

Hey everyone, I wanted to share my experience and ask for some advice regarding automations in Home Assistant. I’ve been using OpenWRT to detect when my phone connects to the WiFi router, which triggers a series of actions like turning on lights and starting the vacuum cleaner. It works perfectly most of the time, but there’s one issue that’s been bugging me: the automation gets triggered every time Home Assistant reboots. I’ve checked the logs, and it seems like the system thinks I’m arriving home even when I’m not.

I’ve tried adjusting the conditions in my automation, but nothing seems to work. Here’s what my current setup looks like:

yaml
alias: Alerts when Arrive Home - Vacuum, Windows, Dog, Washer, Dryer
description: “Alerts when arrive home”
trigger:

  • platform: state
    entity_id:
    • person.user
      from: not_home
      to: home
      for: hours: 0 minutes: 1 seconds: 0
      condition:
      action:

I was wondering if there’s a way to add a condition that checks whether the system rebooted recently before triggering the automation. Maybe something like a cooldown period or a check for the system’s uptime? I’ve heard about using last_boot in automations, but I’m not entirely sure how to implement it.

If anyone has encountered a similar issue or has a clever workaround, I’d love to hear about it! I’m always looking for ways to make my smart home setup more reliable and user-friendly. Thanks in advance for your help! :slight_smile: