Hello all
I use the Ping integration with my mobile to know if I’m home and trigger automations.
The device tracker switches from home to no_home and opposite correctly.
However, if use the ping device_tracker as a reference in my person.me the map never shows me at home.
Any idea what can be wrong ?
editable: true
id: arnaud
device_trackers:
- device_tracker.192_168_1_xxx
- device_tracker.uuuuuu_smart_5
source: device_tracker.192_168_1_160
user_id: 85d27c6d61e54a7fa5f7b1712121bfe7
entity_picture: /api/image/serve/855dcab883d39b3b1a346cb0bb91d863/512x512
friendly_name: uuuuuu
templates:
icon_color: >
if (state == 'home') return 'green'; if (state == 'Home') return 'green';
return 'red';
icon_color: green
Thanks for this information.
However, the app companion (on my mobile) show me at home in the map.
That’s why I thought it was the same.
Currently, if a person is home and detected by some router-based device_tracker - then it’s corresponding “person” entity does not have “latitude” & “longitude” attributes - thus this entity is not shown on a Map (only entities with coords are shown).
But this may change in a future:
home-assistant:dev
← Hypfer:gps_home
opened 09:49AM - 27 Dec 24 UTC
<!--
You are amazing! Thanks for contributing to our project!
Please, DO N… OT DELETE ANY TEXT from this template! (unless instructed).
-->
## Proposed change
<!--
Describe the big picture of your changes here to communicate to the
maintainers why we should accept this pull request. If it fixes a bug
or resolves a feature request, be sure to link to that issue in the
additional information section.
-->
When playing around with the demo instance, I saw that person entities had this map view when opening the more-info dialog

When playing around with my HA instance, they didn't.
This confused me, so I looked at the `person` implementation.
~~I'd argue that if the latest tracker is `home` and there is also a latest `gps` tracker that is also `home`, there is no point in not using the `gps` tracker, as it will provide a **superset** of the data the other non-gps tracker could provide.~~
The architecture discussion sparked by this PR (https://github.com/home-assistant/architecture/discussions/1179) led to the decision that stationary trackers should remain prioritized, but also, to solve the issue of vanishing lat/lon attributes, the zones lat/lon shall be used.
The PR has been updated to reflect that.
## Type of change
<!--
What type of change does your PR introduce to Home Assistant?
NOTE: Please, check only 1! box!
If your PR requires multiple boxes to be checked, you'll most likely need to
split it into multiple PRs. This makes things easier and faster to code review.
-->
- [ ] Dependency upgrade
- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New integration (thank you!)
- [ ] New feature (which adds functionality to an existing integration)
- [ ] Deprecation (breaking change to happen in the future)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
## Additional information
<!--
Details are important, and help maintainers processing your PR.
Please be sure to fill out additional details, if applicable.
-->
- This PR fixes or closes issue: N/A
- This PR is related to issue: N/A
- Link to documentation pull request: N/A
## Checklist
<!--
Put an `x` in the boxes that apply. You can also fill these out after
creating the PR. If you're unsure about any of them, don't hesitate to ask.
We're here to help! This is simply a reminder of what we are going to look
for before merging your code.
-->
- [x] The code change is tested and works locally.
- [x] Local tests pass. **Your PR cannot be merged unless tests pass**
- [x] There is no commented out code in this PR.
- [x] I have followed the [development checklist][dev-checklist]
- [x] I have followed the [perfect PR recommendations][perfect-pr]
- [x] The code has been formatted using Ruff (`ruff format homeassistant tests`)
- [ ] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated for [www.home-assistant.io][docs-repository]
If the code communicates with devices, web services, or third-party tools:
- [ ] The [manifest file][manifest-docs] has all fields filled out correctly.
Updated and included derived files by running: `python3 -m script.hassfest`.
- [ ] New or updated dependencies have been added to `requirements_all.txt`.
Updated by running `python3 -m script.gen_requirements_all`.
- [ ] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
<!--
This project is very active and we have a high turnover of pull requests.
Unfortunately, the number of incoming pull requests is higher than what our
reviewers can review and merge so there is a long backlog of pull requests
waiting for review. You can help here!
By reviewing another pull request, you will help raise the code quality of
that pull request and the final review will be faster. This way the general
pace of pull request reviews will go up and your wait time will go down.
When picking a pull request to review, try to choose one that hasn't yet
been reviewed.
Thanks for helping out!
-->
To help with the load of incoming pull requests:
- [ ] I have reviewed two other [open pull requests][prs] in this repository.
[prs]: https://github.com/home-assistant/core/pulls?q=is%3Aopen+is%3Apr+-author%3A%40me+-draft%3Atrue+-label%3Awaiting-for-upstream+sort%3Acreated-desc+review%3Anone+-status%3Afailure
<!--
Thank you for contributing <3
Below, some useful links you could explore:
-->
[dev-checklist]: https://developers.home-assistant.io/docs/development_checklist/
[manifest-docs]: https://developers.home-assistant.io/docs/creating_integration_manifest/
[quality-scale]: https://developers.home-assistant.io/docs/integration_quality_scale_index/
[docs-repository]: https://github.com/home-assistant/home-assistant.io
[perfect-pr]: https://developers.home-assistant.io/docs/review-process/#creating-the-perfect-pr