#Lights Turning On/Off Automatically with Device Tracker - Need Help

1 messages · Page 1 of 1 (latest)

tight jetty
#

Hi everyone,

I need some help with my Home Assistant setup. Here's the context:

  • Setup: Home Assistant is running on one of my VMs.
  • Devices: I have a Freebox and an iPhone.
  • Problem: Whenever my iPhone is detected via the device_tracker, my lights automatically turn on (which I don’t want).
    • When my phone disconnects (as if I’ve left), the lights turn off.

After investigating:

  • I have no automations configured in the Automations tab in Home Assistant.
  • The only information I see is that the state of the Home zone (zone.home) changes from 0 to 1 (and vice versa, from 1 to 0, when I leave).

Does anyone know where this behavior could be coming from or how I can stop it? Any help would be greatly appreciated! 🙏

pale sky
#

The history for your lights entity should show you what's turning them on or off.

tight jetty
#

Okay, I’ll test it

#

Just "has been turned off"

#

It's when I disconnected (put my phone in airplane mode) to simulate leaving the house

#

Just in case, I deleted all my automations from HA

pale sky
#

My guess is something outside of Home Assistant is turning the lights on and off. There's a couple of things to check: 1. You mentioned that you have an iPhone. Can you check if you have any shortcuts/automations that run based on your home presence? 2. Do you have non Hone Assistant hubs (eg. Aqara, Philips, Ikea, etc...) they may have an automation that adjusts your lights.

tight jetty
#

Yes, I thought about that, but I checked all my home automation apps, and there’s nothing suggesting such an automation.
I don’t have any automation set up with my iPhone or my different hubs (Aqara with the Camera Hub G2H Pro and Philips)

I'm lost 🥲

pale sky
#

Yeah I am running out of ideas too. Did you delete all of your automations prior to posting here or after? If after, are your lights still turning off? Out of curiosity what brand of lights are you using and what integration?

tight jetty
#

Could the device_tracker have an automation somewhere in HA other than in the config file or automations.yaml ?

#

I deleted all my automations a few days ago, and I’ve been trying in vain to find a solution. I’ve already restarted HA (and the VM) multiple times.
I’m only using Philips Hue lights

pale sky
#

I don't know about automations elsewhere, though I would expect them to be listed on the automations page. Apparently Hue lights turning off automatically doesn't appear to be too rare. Someone posted a similar problem to what you're describing in the community forums https://community.home-assistant.io/t/help-hue-lights-randomly-turned-off/671172. In their case they had a group and an automation was turning one of the lights off affecting the entire group

#

I'm out of ideas unfortunately 😢 hopefully someone with more HA experience will be able to step in

tight jetty
#

I’ll read the article

#

but

#

For me, it’s because of this:
When the state is 0, it turns off all my lights.
When the state is 1, it turns them back on.

But I don’t know how to either delete this line from the configuration or see how it’s interfering.

#

Okay, if it’s because of the Philips lights, resetting their configuration is much more appealing than resetting my entire HA setup.😅

tight jetty
#

OOOkay, update:
I deleted all my Philips Hue lights, removed my home, and completely reconfigured and reintegrated everything into HA.
And it’s still not working...
Some lights turn on, others don’t, but when I check the logs, it shows they did turn on.

I don’t understand anything anymore. If anyone sees this and has a solution, please let me know.

tight jetty
#

Okay, update:
I deleted all my Philips Hue lights that were turning on, then reprogrammed them in my setup one by one. I repeated this process until none of the lights were turning on (or off) during this 'bug'.

tight jetty
#

New Update:

I’m an idiot...
I run my HA on Unraid — initially in Docker, but due to missing integrations and features, I switched to a Linux VM, copying over the entire config (to avoid redoing it).

But guess who never turned off their Docker container running an automation 🤡

I just realized that all this time, there was another HA instance running in my home...

End of thread, thanks @pale sky for responding (and supporting me ;) )