Skip to content
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

Merged
merged 5 commits into from
Mar 10, 2024

Conversation

andreasbrett
Copy link
Contributor

@andreasbrett andreasbrett commented Mar 10, 2024

Add 4 extra attributes to device tracker:

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.

Copy link

codecov bot commented Mar 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.06%. Comparing base (ac1cf1a) to head (554bec0).
Report is 6 commits behind head on main.

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     
Flag Coverage Δ
unittests 98.06% <100.00%> (-0.14%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@eifinger eifinger changed the title [feat] add extra attributes to device_tracker feat: add extra attributes to device_tracker Mar 10, 2024
@eifinger
Copy link
Owner

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.

Copy link
Owner

@eifinger eifinger left a 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?

@andreasbrett
Copy link
Contributor Author

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 confidence in the near future I will raise another PR.

@eifinger eifinger merged commit cac4af9 into eifinger:main Mar 10, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants