mandarons / ha-bouncie

Home Assistant custom integration for Bouncie.com - track your car stuff in Home Assistant
BSD 3-Clause "New" or "Revised" License
32 stars 4 forks source link

Location Sensor and Home Assistant Geofencing/Mapping (Device_Tracker Entity) #2

Closed cmaglio closed 1 year ago

cmaglio commented 1 year ago

Use case As a user, I want to be able to see my vehicle's real-time location on the HA "Map" dashboard. Being able to do so would also allow the use of Home Assistant's built-in geofencing and location functionality for automations based on geofenced locations and the like.

Describe the solution you'd like To be honest, I'm not sure of the best way to implement this as I do not know how the built-in Home Assistant mapping and geofencing functionality works. I do know that my Tesla integration shows the vehicle on the "Map" dashboard and then there is a sensor called "Tesla Location" which will show whether the vehicle is within an already defined Home Assistant geofence such as "Home" or "Work". If the vehicle is not within an already defined geofence, the location shows "Away". This "Location" entity is labeled as a "device_tracker" (device_tracker.telsa_location_tracker).

The precise Lat/Lon coorrdinates are an attribute of this device_tracker entity along with some other information such as Heading and Speed. All attributes can also be seen in the screenshot below.

Below is a screenshot of the device_tracker entity from the Tesla integration.

image