iOS icon indicating copy to clipboard operation
iOS copied to clipboard

Automation that depends on whether iphone is home or away intermittently fires even when at home.

Open IraSch opened this issue 2 months ago • 5 comments

iOS device model, version and app version

Model Name: Software Version: App version:

Home Assistant Core Version

Describe the bug

To Reproduce

Expected behavior

Screenshots

Additional context

IraSch avatar Oct 24 '25 23:10 IraSch

Running on HA Green Core: 2025.10.3 OS: 16.2 Companion app: 2025.1443

iPhone 16, 26..0.1

I have an automation that turns a device on when my phone leaves home and turns it off when my phone returns. It works, but it also thought my phone had left when it was still in the house and fired off the automation action. Moments later it realized the phone was home and fired off the "returning" part of the automation action. The Automation was created based on the blueprint below:

` domain: automation input: iphone_tracker: name: iPhone Tracker description: Select your iPhone device tracker entity (from the Home Assistant Companion App). selector: entity: domain: device_tracker air_cleaner: name: Air Cleaner Switch description: The air cleaner entity to control. selector: entity: domain: switch

trigger:

  • platform: state entity_id: !input iphone_tracker from: "home" to: "not_home"
  • platform: state entity_id: !input iphone_tracker from: "not_home" to: "home"

action:

  • choose:
    • conditions:
      • condition: state entity_id: !input iphone_tracker state: "not_home" sequence:
      • service: switch.turn_on target: entity_id: !input air_cleaner
    • conditions:
      • condition: state entity_id: !input iphone_tracker state: "home" sequence:
      • service: switch.turn_off target: entity_id: !input air_cleaner mode: single `

IraSch avatar Oct 24 '25 23:10 IraSch

Does this happens often? Do you live in a house or apartment?

bgoncal avatar Oct 27 '25 12:10 bgoncal

The automation is less than a week old, and it has happened twice so far, and not on the same day.

We live in a house. When the automation fires "correctly", the phone is about 100-150' from the house. Same when we return - it sees the phone returning about 100-150' from the house.

When the problem occurs, the phone is pretty much in the same location (within about 10') from when we built and started the automation in the first place.

What sets the "home" GPS position? Maybe we need to set/reset that?

Thanks.

IraSch avatar Oct 27 '25 14:10 IraSch

Check if you don't have multiple devices associated with your "Person" in home assistant

bgoncal avatar Oct 27 '25 14:10 bgoncal

We have two devices associated with this person (the only person so far). The iPhone and an iPad. Both generally stay together at home and also when we leave the house. When the automation "false's" (thinks we've left the house but haven't), both are within 10' of each other.

IraSch avatar Oct 27 '25 15:10 IraSch