I have follow this tutorial to get my car location. Now sensor.car_latitude and sensor.car_longitude have the updated GPS coordinates of my car. How could I create a device_tracker from these sensors? I want to show in the integrated HA map and use zones, not only showing in Google Maps, like the tutorial.
I’ll reply here since this thread came up in my search when I was looking to solve this same thing, and this was left unanswered. I skipped over the part of creating template sensors based on the attributes for the REST component and instead just mapped the attributes in my service call, but this will work the same either way.
In my configuration, I’m retrieving GPS coordinates from a REST endpoint for a vehicle tracker (doesn’t matter what kind), and using it to update a device_tracker entity for the car.
If you have individual sensors for lat/lon, you can change the template for the gps values in the automation to use the states function instead of state_attr.
Also the device_tracker.seeservice can take a location name parameter, but HA will resolve a zone based on the GPS coordinates automatically.