Proximity between to person entites / device trackers

Hi everyone,

I want to have a sensor which will hold the distance in meters/kilometers between two device tracker or person entities.

Anyone implemented it and could share their experience ?

This can done using the distance function which is built-in in hass jinja templates:

{{ distance('person.ohad', 'person.rinat') }}
2 Likes