Proximity sensor - problem

Hi,
I am recently having problems with the proximity sensor. Specifically: I have set up a proximity sensor based on the distance from home, the problem is that sometimes it seems to “follow” only one device/person in the list.
For example: yesterday 2 devices out of 3 were at home (also confirmed by the family group in “home” status and by the status of the devices itself), while the third device was moving away.
Well, the proximity sensor marked the closest device at 15km (that is where the third device was). This obviously triggered all the automations that use it.
I tried to create 2 identical sensors, one that uses “device.tracker” and one that uses “person” and now one marks 0 distance (rightly, since there are smartphones at home) while the other marks 5 (ie the distance at which only one of the 3 devices is).
Is there something I’m missing?
p.s. the position on the map, the home/not_home status of the devices and the family group work perfectly.

This is the code:

proximity:
  casa:
    zone: home
    devices:
      - person.tizio
      - person.caio
      - person.ciccio
    tolerance: 100
    unit_of_measurement: km
  casa2:
    zone: home
    devices:
      - device_tracker.tizio
      - device_tracker.caio
      - device_tracker.ciccio
    tolerance: 100
    unit_of_measurement: km

Thank you!!

Ciao @metcrl - I am also setting up my proximity sensors and think I am misunderstanding this. The documentation does seem a bit lacking. I found this post, which the user seems to create a sensor per person, per location. Here’s the link..

Here’s the code snippet of interest:

proximity:
  norbert_home:
    zone: home
    devices: device_tracker.pixel_3a
    tolerance: 50
    unit_of_measurement: km
  noemi_home:
    zone: home
    devices: device_tracker.mi_8
    tolerance: 50
    unit_of_measurement: km

But what I don’t get is what is the point of multiple devices? If it only shows the nearest, then maybe the automation is when closest device is closer than xx km, do something?

I hope this helps. Since you posted back in Feb, did you figure it out? Or did you do what the other poster did?

2 Likes

You are correct. With multiple devices it tracks the nearest. However, a sensor per device per zone is much useful for my purposes.

It would seem that the problem is present when there are two proximity zones containing the same elements.
This seems to be a BUG