-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Person tracking does not trust zone name if source type is not GPS #134344
Comments
there are two different type of tracking entities - ScannerEntity and TrackerEntities - the later are for tracking the location of a device, so it has always |
Thanks for your quick answer.
And then there's the entity I added in there via It doesn't look like it would be hurtful to allow all device_tracker entities to report more precise location states than |
so a ScannerEntity should never report a location - but a TrackerEntity.
your self created entity needs to be an TrackerEntity if it should provide the location |
I understand this, however I feel like this should not be a requirement (if by "location" you mean "zone"), which is why I created this issue. |
The difference between these two types of device tracker entities is on purpose, so that consuming integrations know what to expect. |
The problem
Person entities will copy the device_tracker's zone only if it has
source_type
:gps
, or if the state is eitherhome
ornot_home
.Otherwise, it will always set the state to
unknown
.This is not desirable behavior: if I have another device tracker that reports zones without gps information, the zones it provides should be trusted when used as
device_tracker
for a person.Specifically, it looks like this line:
core/homeassistant/components/person/__init__.py
Line 529 in 06b33e5
should be replaced by: if state is not unknown nor unavailable, so as to allow using as fallback non-gps trackers that report another value than
home
ornot_home
. (Or better yet, the "not not_home nor home nor gps" should be an intermediate level, so that zone trackers are prioritized over stationary device trackers that only report not_home)Is that something that sounds reasonable, and I could open a PR for it?
What version of Home Assistant Core has the issue?
core-2024.12.5
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
Person
Link to integration documentation on our website
https://www.home-assistant.io/integrations/person/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: