esphome / feature-requests

ESPHome Feature Request Tracker
https://esphome.io/
404 stars 26 forks source link

GPS Component - Home Assistant device_tracker integration. #2400

Open TLCary opened 9 months ago

TLCary commented 9 months ago

Describe the problem you have/What new integration you would like

I would like the GPS Component to return an additional formatted string made up of the latitude and longitude states to be used in a device_tracker. If you could also call the device_tracker.see service, that would be helpful.

Please describe your use case for this integration and alternatives you've tried:

It's difficult to implement a device tracker in Home Assistant from the ESPHome GPS Component. An alternative would be to create a text sensor to call device_tracker.see service and send it {"[ " + to_string(id(my_lat).state) + " , " + to_string(id(my_lon).state) + " ]"};

Additional context

This would make the GPS Component, Home Assistant integration much more user-friendly.

nagyrobi commented 9 months ago

Try making a template sensor in HA with attributes like:

latitude: 54.0342230000
longitude: -107.1700410000

It doesn't need the see service.