Open tom-parkinson opened 10 months ago
Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (device_tracker
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
device_tracker documentation device_tracker source (message by IssueLinks)
+1 to this request
I had a quick look at the device update code, and if I understand the code here correctly, it shows that the friendly_name of the zone is obtained by accurately determining the zone based on gps. But without gps, the location_name obtained from the device app is used instead of the zone name, I assume. I guess it's enough to add an attempt to convert location_name to zone and get the friendly_name of the zone.
Only I am not sure how exactly to convert the zone id string into a zone object to get the friendly_name of the zone
I guess, something like this:
# ...
if self.location_name:
zone_state = zone.get_zone_state(self.hass, self.location_name)
self._state = self.location_name if zone_state is None else zone_state.name
# elif ...
assuming zone.get_zone_state
should look something like this (based on zone.async_active_zone
):
def get_zone_state(hass: HomeAssistant, zone_id: str) -> State | None:
""" Find the active zone with given id. """
zone = hass.states.get(zone_id) # possible security hole? Device app can send any entity id
if (
not zone
or zone.state == STATE_UNAVAILABLE
or zone.attributes.get(ATTR_PASSIVE)
):
return None
return zone
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
I'm not sure if anyone will see this, but @dakone22 has offered much more insight than I can on the issue. Any idea how to get this resurfaced?
This issue still persists in the newest version - zone is still being presented non-friendly when Privacy == Zone Name Only.
I have the same issue in my HomeAssistant instance. I found out about this issue after setting the tracking to zone only. The number of people in a zone isn't updated, besides the Home zone. I am currently at work and HA doesn't trigger the automation linked to this zone.
Hey there, Got the same issue, is there a workaround (beside changing to precise location)?
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
This hasn't been fixed
Agreed with Tom
pt., 30 sie 2024 o 00:42 Tom Parkinson @.***> napisał(a):
This hasn't been fixed
— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/105773#issuecomment-2319191208, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEO35J7BBWA7AFBF3Q6ONV3ZT6PVXAVCNFSM6AAAAABAVQ5XVCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJZGE4TCMRQHA . You are receiving this because you commented.Message ID: @.***>
+1 on this request. Experiencing the exact same issue.
The problem
If "Zone Name Only" is set under the "Location Sent" setting of the Companion app, then the entity name of the zone gets shown on the person entity cards on the dashboard. This behaviour is inconsistent with the "Exact" location sent setting, which shows the friendly name of the zone.
In this example, kids have the “Location Sent” to “Exact” under Privacy in the app and for adults to “Zone Name Only”. The dashboard with simple person entities shows correctly “Home” and “Away” for all. However, once in a pre-configured zone:
kids: it displays the zone’s friendly name, e.g. “School” adults: it displays the zone’s entity, like “kids_school” instead of “School”.
There's a forum discussion thread with several users about this. It was also submitted as an issue on the frontend but no problems reported there.
What version of Home Assistant Core has the issue?
2023.12.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Device tracker
Link to integration documentation on our website
https://www.home-assistant.io/integrations/device_tracker/
Diagnostics information
State and attributes of the privacy-enabled person as well as the zone when issue appears:
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response