Reverse Geocode Sensor ("Places") using OpenStreetMap - custom component

Hello,

I’m hoping someone can help me with this issue.

I have a Samsung A21S phone that I’m using and two weeks ago it stopped updating its location. I’ve checked the phone and Location Services is still enabled. The only thing I can think of that has happened to the phone is a Samsung Update or 2.

Is there something I can do to check further?

TIA

I’m having issue lately,

Street and City attribute are not showing, when stationary and @ home.

It was never like this before. Did it changed recently?

These are the only attribute showing.

current_longitude: reducted
previous_latitude: reducted
previous_longitude: reducted
devicetracker_entityid: device_tracker.iphone_xr
devicetracker_zone: home
devicetracker_zone_name: Home
home_zone: zone.home
home_latitude: reducted
home_longitude: redcuted
distance_from_home_km: 0.099
distance_from_home_m: 99.119
distance_from_home_mi: 0.062
distance_traveled_m: 11.559
distance_traveled_mi: 0.007
last_place_name: Home
direction_of_travel: stationary
map_link: reducted
gps_accuracy: 35
display_options: street, city
last_changed: 2023-04-22 22:06:09
last_updated: 2023-04-22 23:17:23
icon: mdi:map-search-outline
friendly_name: geo_loc_iphonexr

I actually got this working how i wanted using the custom:multiple-entity-row card

type: entities
entities:
  - entity: sensor.me_place
    type: custom:multiple-entity-row
    tap_action:
      action: more-info
      entity: person.me

If i click on the “name” of the places entity, in the entities card, i get the history of the places entity.
if i click on the value/places location, it pops up open street map inside HA the same as the person entity does.

I tried to use your code but i get a permission not allowed by osm.

Schermata 2023-05-16 alle 16.57.03

This is the used code:

          - type: custom:config-template-card
            variables:
              MAP_URL: states['sensor.fha_place'].attributes['map_link']
            entities:
              - sensor.fha_place
            card:
              type: iframe
              url: ${MAP_URL}

Could you elaborate - is it an error?
Where do you get it?

No error… the map is not shown with a permission denied by OSM.
I got the code from one of your posts…

Try this simple code - does it work?

              type: iframe
              url: google.com

It works, but strangely it shows inside the frame my lovelace dashboard.

Ah sorry… i put the iframe code inside the card i show you…
If i use a simple card with iframe it shows google.com site

Maybe because the osm site uses https:?

  1. Not clear what do you mean “inside a frame” w/o seeing a picture.
  2. Imho discussing this is an off-topic here… May be you should create a separate topic & tag me there then.

Ok, but i think the iframe is not shown becaause OSM uses https site…

Hello Everyone,

Wondering if it’s possible to change the date format from mm/dd to dd/mm

TIA

Good day everyone,
I am new to the HASS community and am testing alot of things here. Found this Places to be useful for my automation.
With the guide, I managed to get it all set up. But it still shows the location as Unknown. In the companion app, I have enabled the geocoded location sensor. Any help is appreciated.

Another thing, do I use the Map card to display it on the dashboard? I tried it but it only shows the map with no location of where I am.


image

v2.4.4 just released should use your locale’s date format.

  1. See if upgrading to v2.4.4 fixes your issues.

If not, I’m going to need some more information to help troubleshoot:

  1. Look in the Home Assistant logs (under Settings, System, Logs and then Load Full Logs) to see if there are any places errors.
  2. If no obvious errors, please enable debug logging and submit these logs so I can see if I can pinpoint what is happening.

If possible, please create a GitHub issue to post your errors or logs. If not, you can post them here.

1 Like

I’ve been unable to update to 2.4.4. Select update and the spinning wheel only on the update button. Waited 30 mins. Repeated and the same. On latest HA version.

Hi Snuffy2,

I’ve just updated to 2.4.4, still the same. Checked the logs and nothing on ‘places’ except compatibility reminder by HA. Will do the debug and send it over the weekend.

Thanks.

Hi @Snuffy2 ,

Managed to get the time to get the debug logs and created a github issue ticket. Github ticket
Hope that helps.

Thanks

Sorry but still using mm/dd instead of dd/mm.

So I’ve not found a way to programmatically determine the region’s date format from HASS. I am using the system’s locale data but that may not actually be set on your system (which is common on machines running HASS from my experience).

If you are so motivated, can you update places to v2.4.5, enable debug logging and restart HASS. Then look in the HASS System Logs for the for the places init lines that show what locale it is detecting as well as date format for that locale. It should look like:

2023-08-28 18:28:44.642 DEBUG (MainThread) [custom_components.places.sensor] (Snuffy2s Place) [Init] Locale: ('en_US', 'UTF-8')
2023-08-28 18:28:44.642 DEBUG (MainThread) [custom_components.places.sensor] (Snuffy2s Place) [Init] Locale Date Format: %m/%d/%y

Still incorrect format:

2023-08-30 08:34:05.907 INFO (MainThread) [custom_components.places.sensor] (GregH) [Init] Places sensor: GregH
2023-08-30 08:34:05.907 DEBUG (MainThread) [custom_components.places.sensor] (GregH) [Init] Locale: ('en_US', 'UTF-8')
2023-08-30 08:34:05.907 DEBUG (MainThread) [custom_components.places.sensor] (GregH) [Init] Locale Date Format: %m/%d/%y

I’m in Australia so format should be ddmmyy

If I run docker inspect on the HA container:

root@omv:~# docker inspect 166931e562db | locale
LANG=en_AU.UTF-8
LANGUAGE=en_AU:en
LC_CTYPE="en_AU.UTF-8"
LC_NUMERIC="en_AU.UTF-8"
LC_TIME="en_AU.UTF-8"
LC_COLLATE="en_AU.UTF-8"
LC_MONETARY="en_AU.UTF-8"
LC_MESSAGES="en_AU.UTF-8"
LC_PAPER="en_AU.UTF-8"
LC_NAME="en_AU.UTF-8"
LC_ADDRESS="en_AU.UTF-8"
LC_TELEPHONE="en_AU.UTF-8"
LC_MEASUREMENT="en_AU.UTF-8"
LC_IDENTIFICATION="en_AU.UTF-8"
LC_ALL=
root@omv:~#