I would like to be able to access the bearing between my personal location and a zone. The most generic and future proof way, to me, would be to add the bearing to the Proximity integration.
It could simply be the bearing from the nearest device tracker to the zone. That is, the same device as that is used for calculating the distance and direction. So, if I’m north of a zone, the bearing would be 180 or 360 degrees. And when I’m east of the zone, the bearing would be 90 or 270 degrees. Etc.
This request is a follow up to an old post of mine:
The logic might be based on this trig computation:
Background / Use Case
I travel to work by bike. My plan is to show a card with information for my daily commute. One of the entities that I want to show (sensor, binary sensor, I don’t know yet) is an average headwind, tailwind or sidewind (or no wind, if the speed is below a certain treshold).
To determine this, I need to calculate a bearing between my current location and my home zone or my work zone. Both have coordinates in my config. I will then compare the bearing with the wind direction.