I am a beginner to templates and creating new sensors, so I need some help.
My Goal : I have integrated Mercedes Me and now have an entity which has latitude and longitude as Attributes. On the logbook it displays Home, Work, other but I want it to specify the address of “other”, just like how I can track my Phone by address.
What I tried to do unsuccessfully : Created a template sensor but pulling out the Latitude and Logitude. Then used an automation using “device_tracker.see”. I did this based on this thread - Cannot figure out device_tracker.see service [Solved]
What is going wrong? Is it just that you’re not getting an address? I’m guessing that on your phone you’re using the companion app, and that does send an address. It’s not a function of all device trackers.
Regardless, your “see” service call doesn’t look right, as it has no dev_id. I’m not sure what you’re wanting to do by copying the lat/long from “w1kcg2db8pa” into other entities, and then use them in a “see” call for another entity.
There is a HACS Places integration that can take a device tracker with gps and give you the address. You should be able to configure it with your “w1kcg2db8pa” (the car?) entity directly.
Your automation is missing a required configuration variable, and you are trying to make device_tracker.see do something it’s not really able to do. The first part is a pretty simple fix:
But that will not get you a street address. As mentioned by Michael, you will need to use Places or a different Reverse Geocode Location service like Google Geocode
The Host name is optional… if you don’t know what it is, don’t use that configuration variable.
The dev_id is required. As Andy already stated and the documents show, the dev_id is the object id of the device tracker entity you are trying to set. You can create a device tracker entity using known_devices.yaml. The device_tracker.see service will not create a new entity.
Be aware, if you use the device_tracker.see service on an device tracker that was created by another integration, it will only keep the value you set until it is updated by its own integration.
Hi there! It looks like you’re on the right track with your template sensors for Car Latitude and Car Longitude. However, for the issue with specifying the address for “other,” you may want to consider integrating a geocoding service in your automation. You can connect this with Shehu Rental Cars by extending the automation to include a service call to obtain the address using the latitude and longitude values. This will enhance the logbook entries and provide more detailed location information for “other” destinations. Keep exploring and feel free to reach out for more assistance!