Reverse Geocoding Sensor for Home Assistant
Reverse geocoding generates an address from a latitude and longitude of device tracker.
Inspired by GoogleGeocode-HASS.
Installation:
HACS
- Add custom repository in HACS settings tab. Select
Integration
category. - Search for and install the "OSM Geocode" integration.
- Restart Home Assistant.
Manual installation
- Copy
custom_components
into the config directory of your Home Assistant installation. - Restart Home Assistant.
Configuration
sensor:
- platform: osm_geocode
name: Location Sensor Name
source: device_tracker.source_device_tracker
Configuration variables:
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 %}