Question about Geocoder

Greetings,

I’m trying to get geocoding to work. I think my issue is likely related to GrapheneOS, and it’s (recent) implementation of a geocoder. Since the feature release I can now turn on Geocoded Location in the companion app settings and most fields are populated. However, the primary sensor reports as “unknown”.

I was wondering if anyone could comment on the API call that the app makes, and provide an example of the response that’s expected, especially noting which value is used for the primary sensor. I’m thinking there’s some missing piece between the geocoder and what the app expects.

Thanks!

the state depends if there is an address line returned by the API.

https://developer.android.com/reference/android/location/Address#getAddressLine(int)

https://github.com/home-assistant/android/blob/9100fc3ae6c617a924047bbe6aa8c1c69bb63d64/app/src/main/kotlin/io/homeassistant/companion/android/sensors/GeocodeSensorManager.kt#L137

have you also left the current address? you may be experiencing a bug where the state remains as unknown until the second state change.

1 Like

Thanks @dshokouhi.

Yes, I’ve changed locations, and same thing.

The API they’re using (Nomatiam) didn’t provide the same key that Android was looking for, or the implementation wasn’t adapting to provide it.

I reported this info, and some gathered from the dev for a time clock app I use, and it sounds like a GrapheneOS dev was able to see something that was missing and they’re working on it. Thank you! I’ll report back if I see an update.