Reverse geocoding generates an address from a latitude and longitude of device tracker.
Inspired by GoogleGeocode-HASS.
- Add custom repository in HACS settings tab. Select
Integrationcategory. - Search for and install the "OSM Geocode" integration.
- Restart Home Assistant.
- Copy
custom_componentsinto the config directory of your Home Assistant installation. - Restart Home Assistant.
sensor:
- platform: osm_geocode
name: Location Sensor Name
source: device_tracker.source_device_tracker
source (Required): device_tracker that produces latitude and longitude
name (Required): A name to display on the sensor
scan_interval (Optional): The frequency of scan in seconds. Default: 60.
icon (Optional): Icon to display. Default: "mdi:map-marker".
template (Optional):
Possible attributes: category, type, importance, addresstype, name, display_name, address, house_number, road, city_district, city, county, state, postcode, country, country_code,
Default:
{% if zone %} {{ zone }} {% else %} {% if name %} {{ name }}, {% endif %} {{ house_number }} {{ road }}, {{ city_district }}, {{ city }} {% endif %}

