Proximity State Change Errors

I keep getting the following error that is filling my log that is from the proximity component:

2022-10-31 15:41:51.975 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/proximity/__init__.py", line 289, in check_proximity_state_change
    assert new_distance is not None and old_distance is not None

My proximity config hasn’t changed in a really long time. The only device_trackers are my phone, which works fine in other components. I know from the error that it new_distance and old_distance are None, but I can’t for the life of me figure out which proximity entry is the culprit. Before I just comment them all out and then reboot the system (and then adding them back in one at a time), does anyone have any ideas how I can figure out which entry is the culprit? Or is it something else?

3 Likes

Sorry for bumping this old topic, but this was the only recent one I could find.

After removing the proximity section from configuration.yaml and adding entries back one by one I found out that one zone had the wrong name. Sensor name was Work, but the entity was actually called zone.test.

So after fixing that, the errors are now gone.

Just in case anybody else stumbles upon this.

2 Likes

Thanks, is works for me