Lovelace map card not displaying geocoded entities

Still not the same…

Look at the second copied line

Thanks, that helped.
Ok, I can restart the server with this.

Does that mean the sensor.xyz is made?

Yep unless that already exists, then it will create xyz_2

I got this error message on start up.

Logger: homeassistant.config
Source: config.py:464
First occurred: 12:03:40 PM (1 occurrences)
Last logged: 12:03:40 PM
Invalid config for [template]: expected a dictionary for dictionary value @ data['sensor'][0]['attributes']. Got 'latitude:"{{ state_attr(\'sensor.moto_g_power_geocoded_location\', \'Latitude\') }}" longitude:"{{ state_attr(\'sensor.moto_g_power_geocoded_location\', \'Longitude\') }}"'. (See /config/configuration.yaml, line 28). 

Put a space between the colon and “ on each attribute

The colon on a field can’t touch the value

Awesome, that make it work!! Thank you very much!

If you don’t mind, would you please edit the original codes?

Yep.

Also, word of advice: use something other than nano to edit your files. You’ll move much faster. Install samba, or vscode extension

I’m currently running HA on Docker on top of a Raspbian lite on a Pi3B.
I suppose your prefer method to code on HA is to use Samba to transfer file to work on with VScode. I’ll get them install and start learning!

Thanks for all your help.

I use samba but I expose the config location and just work out of that directory from a windows box.

1 Like

I had the same problem with the companion app for ios. This solution builds on @petro 's solution but instead uses the geocode entities in two new template sensors. Now the map can display both new entities which start “sensor.location”. So basically add the code below to config.yaml after editing it with your own sensor/entity names, then restart core, then edit your map in lovelace, (or whatever the new dashboards are called) ie add sensor.location_wilma to the map. As Location is a list, indicated by square brackets, then you can access the first element in the list using [0] which is lattitude:

template:
- sensor:
  - name: Location_Wilma
    state: "{{ states('sensor.wilma_s_11_pro_max_geocoded_location') }}"
    attributes:
      latitude: " {{ state_attr('sensor.wilma_s_11_pro_max_geocoded_location', 'Location')[0] }}"
      longitude: " {{ state_attr('sensor.wilma_s_11_pro_max_geocoded_location', 'Location')[1] }}"
  - name: Location_Fred
    state: "{{ states('sensor.max_4_geocoded_location_2') }}"
    attributes:
      latitude: " {{ state_attr('sensor.max_4_geocoded_location_2', 'Location')[0] }}"
      longitude: " {{ state_attr('sensor.max_4_geocoded_location_2', 'Location')[1] }}"

Enjoy!

1 Like

Zdravim ta, pridaj sa k nam ak chces : Telegram: Contact @homeassitant_slovensko