frontend icon indicating copy to clipboard operation
frontend copied to clipboard

Map now shows geocoded location sensor while device_tracker is also there

Open hmmbob opened this issue 2 years ago • 16 comments

Checklist

  • [X] I have updated to the latest available Home Assistant version.
  • [X] I have cleared the cache of my browser.
  • [X] I have tried a different browser to see if it is related to my browser.

Describe the issue you are experiencing

Since the latest HA Companion app upgrade (latest beta), a new device shows in the Home Assistant frontend map pane. This is duplicate information, as the person entity linked to this device_tracker also shows in the map. I actually don't see the added value of the geocoded location sensor showing in the map, as one cannot attach it to a person (person only allows device_tracker devices) and it now duplicates information.

image Same device, twice on the map

Furthermore, the sensor also isn't hidden in the home zone: image

Describe the behavior you expected

A tracked device should only show once on the map, and if the tracked device is attached to a person, only the person entity should show.

Steps to reproduce the issue

  1. Upgrade to latest beta (android in this case) HA companion app
  2. Make sure to enable both device_tracker and sensor.geocoded_location
  3. Observe built-in map panel

What version of Home Assistant Core has the issue?

core-2022.3.1

What was the last working version of Home Assistant Core?

n/a

In which browser are you experiencing the issue with?

Chrome + HA app

Which operating system are you using to run this browser?

all

State of relevant entities

image (No worries, used fake GPS)

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

Caused by https://github.com/home-assistant/android/pull/2341 Initial issue in Android repo: https://github.com/home-assistant/android/issues/2348

hmmbob avatar Mar 07 '22 15:03 hmmbob

To add to this issue, the docs for the map panel clearly state it should only show device trackers.

https://www.home-assistant.io/integrations/map/

This offers a map on the frontend to display the location of tracked devices. To set up tracked devices, look at the [device tracker](https://www.home-assistant.io/integrations/device_tracker/) documentation.

dshokouhi avatar Mar 07 '22 16:03 dshokouhi

Same here.... But on the latest Home Assistant 2022.3.2:

  • Pixel 3A android 12 does have Sensor Geocoded Location and updates on the map
  • Huawei 7C Android 9 - Doesn't have geocoded location, only tracker sensor and stuck on the map in the one place and dont move
  • Huawei P Smart Z Android 10 - Deosnt have geocoded location, only tracker sensor and doesnt show on the map at all

SlyFoxeh avatar Mar 08 '22 07:03 SlyFoxeh

It's based on the HA app version you run, it's only an issue with latest beta (at least for Android)

hmmbob avatar Mar 08 '22 07:03 hmmbob

It's based on the HA app version you run, it's only an issue with latest beta (at least for Android)

Latest Beta of HA phone app only on pixel 3a, on the Huawei 7C and Huawei P Smart Z installed latest public release, but now was downgrade to rhe public on the pixel 3a and still P Smart Z doesnt appear on the map, Huawei 7C stuck on the previous geo location

SlyFoxeh avatar Mar 08 '22 07:03 SlyFoxeh

looks like a different issue, please open a new one

hmmbob avatar Mar 08 '22 07:03 hmmbob

My app only just updated last night but I am also seeing this now. Pixel 4a

SgtBatten avatar Mar 15 '22 19:03 SgtBatten

Yeah, apparently this feature made it to the stable Android app (no longer beta only), because all other tracked devices in our house now also show this behavior. A lot of duplicate icons on the map now 😢

hmmbob avatar Mar 16 '22 10:03 hmmbob

I think the functionality is actually in HA core and the Android app update fixed a compatibility that was previously broken, this revealing this issue.

SgtBatten avatar Mar 17 '22 06:03 SgtBatten

I think the functionality is actually in HA core and the Android app update fixed a compatibility that was previously broken, this revealing this issue.

No, it is a frontend issue. The core map component is very limited and only registers a sidepanel: https://github.com/home-assistant/core/blob/dev/homeassistant/components/map/init.py

All logic is in the frontend: https://github.com/home-assistant/frontend/blob/dev/src/panels/map/ha-panel-map.ts

hmmbob avatar Mar 21 '22 13:03 hmmbob

Any update on this?

engeles20 avatar Mar 30 '22 16:03 engeles20

Still no news? It's a pretty anoying issue (well, at least for me).

AdmiralStipe avatar Apr 11 '22 11:04 AdmiralStipe

Also having this issue, SGL device appeared on my map and won't go away, annoying since it doesn't even disappear when I'm home

GrayJackal avatar May 04 '22 00:05 GrayJackal

I can confirm this is still an issue in 2022.5.0.

ghluhi avatar May 05 '22 10:05 ghluhi

I have had the same issue since March also. I have been using a workaround fix for the time being which works pretty well. A separate dashboard with the map card in panel mode looks convincingly similar to the regular map dashboard.

Here is my Map Dashboard YAML

views:
  - theme: Backend-selected
    title: Map
    type: panel
    badges: []
    cards:
      - type: map
        entities:
          - entity: person.person1
          - entity: person.person2
          - entity: zone.home
        default_zoom: 17

Whilst this does not 'fix' the issue with the default maps, it does offer a convincing look-alike (with arguably more features!)

rayfoster14 avatar May 06 '22 09:05 rayfoster14

Still an issue in 2022.6.0

Mr-Groch avatar Jun 03 '22 09:06 Mr-Groch

Stumbled on this as well... how to change this annoying behavior?

sanderlv avatar Jun 19 '22 08:06 sanderlv

Just wanted to give everyone an update here. The android app will be moving away from having latitude and longitude as attributes of the geocoded sensor after the above linked PR is merged. We will be combining the attributes into location just like iOS so that will solve this issue.

dshokouhi avatar Aug 21 '22 04:08 dshokouhi

Great, thanks!

hmmbob avatar Aug 21 '22 05:08 hmmbob

Is there any progress on this? Could it be I have changed something in the past triggering this behavior or does every homeassitant users have this?

I have the issue in as well the android map as in the browser map.

sanderlv avatar Aug 26 '22 12:08 sanderlv

Is there any progress on this?

My comment just above yours was 5 days ago, I think we can have some patience while we wait for the PR to be merged.

dshokouhi avatar Aug 26 '22 12:08 dshokouhi

Sorry, I did not realize that this would solve the issue on the map version in the browser as well. I have interpreted it as it was only for the companion app. (as that is what you wrote: The android app will be moving away....)

sanderlv avatar Aug 26 '22 12:08 sanderlv

The issue is with the data from the sensor provided by the Android app which causes it to show up in the maps. It can only be fixed in the Android app.

dshokouhi avatar Aug 26 '22 12:08 dshokouhi

photo_2022-08-30_16-10-29 hola, after updating app to 2022.8 device_tracker still not equal to geocoded_location..It feels like it froze my home coordinates and doesnt want to change to actual ones. (Android, Samsung)

heso avatar Aug 30 '22 11:08 heso

This is actually fixed in the latest beta and not in 2022.08. Will be in the next release of the Android app the beta will be in the play store Saturday night pending review from Google.

dshokouhi avatar Aug 30 '22 11:08 dshokouhi

Fixed via https://github.com/home-assistant/android/pull/2809

dshokouhi avatar Aug 30 '22 11:08 dshokouhi

Closing as this has been rolled out to all users.

dshokouhi avatar Oct 16 '22 15:10 dshokouhi