I have a few old automations that are designed to unlock my front door, or open my garage door, depending on how I leave. If I ride my bike or car, it opens my garage, if I leave via front door, it opens the front door. Pretty simple. Except!!! I did this in pieces, so it’s 2 separate automations. One detects my phone entering the “home zone”, the other detects an event firing (iOS triggered the event via ‘shortcuts’)

There is now “zone based” automations, and there is also my “person entity”. So the way I see it, I have 3 different ways to tell when I come home:

  1. My phone’s gps enters the ‘home zone’

  2. My HA ‘person’ state changes from ‘away’ to ‘home’

  3. My phone’s shortcut app fires an event that is detected.

I feel like #1 and #2 are the same, no? I only have one device linked to my person entity, and it’s my phone. Is there any difference in this case? Is there a preferred choice?

  • MuttMutt@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 days ago

    I do something similar with node red and some lights. It’s all based off of person.xxxxxxx locations.

    If I was going to try and do something based on if a vehicle was used then I would probably attach Bluetooth trackers to the car and bike and use those for particular automations. There will be a little bit of a delay while the system before the door opens or closes until they connect up and it will require a Bluetooth AP connected to HomeAssistant but it gives finer grained control. But you would need to do checks that both your phone and something else entered the area to prevent the door from also unlocking.

    Or you could use use you phone as a Bluetooth beacon/tracker and set something based on its last seen location before leaving.

    Setting up with each device tracked also gives you the opportunity to give warnings if they leave without your phone as well as to use crowd tracking if they do.

    • Lemmee@sh.itjust.worksOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 day ago

      That’s pretty much what I do now. But I don’t care if I leave via bike or car, just depends if I leave through the garage door, or the front door. So I have a helper that gets toggled if the garage door closes and I leave the house zone within 10 mins. Then when I return, I want to just use one trigger, and have an if/else that looks at the state of the helper toggle. I really have been operating with the “if it aint broke, don’t fix it” mentality. But when things break, I like to take a look at the whole landscape, and see if I can make some larger improvements when I fix it. That’s what prompted this – I got home and my garage door didn’t open.