-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: add extra attributes to device_tracker #371
feat: add extra attributes to device_tracker #371
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #371 +/- ##
==========================================
- Coverage 98.20% 98.06% -0.14%
==========================================
Files 20 20
Lines 668 777 +109
==========================================
+ Hits 656 762 +106
- Misses 12 15 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I saw you picked up on the naming scheme. I went for https://www.conventionalcommits.org/en/v1.0.0/ in this repo. In newer repos I do like https://github.com/release-drafter/release-drafter more but its a personal choice. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution!
Can you please add those new attributes to the tests?
Added tests. While testing I could not get a confidence value in the API responses, so I removed it from this PR for now. I thought I had seen confidence values from the responses though. Might be my sickness atm though. If I pick up |
Add 4 extra attributes to device tracker:
confidence (GPS signal confidence)Speed and course should be quite valuable since it allows HA to determine the direction of travel and speed. I'm not perfectly sure these are used for the Proximity integration or if that is derived from the GPS location history. Since the HA mobile app is providing both attributes though and proximity sensors work very well with them, we should pass those attributes on from the Weenect API to HA.
PDOP and confidence on the other hand are for advanced users that want to dig deeper into GSM signal details. Basically they provide more detail on the GPS accuracy (when "number of GPS satellites" just isn't enough). I don't think it hurts to expose them via extra attributes. I didn't see them important enough to make dedicated sensors out of them though.