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 support for HT1 #20

Merged
merged 11 commits into from Dec 29, 2023
Merged

Conversation

ashleigh-hopkins
Copy link
Contributor

@ashleigh-hopkins ashleigh-hopkins commented Dec 29, 2023

Hey, I reverse engineered the calculation for the HT1 and thought it might be useful for some people with this older device. Tested with the single HT1 I own (I also have a HT.w).

I wrote some tests, but I'm not actually sure how to execute them - I'm pretty new to python 😅

related issue home-assistant/core#76638

Copy link

codecov bot commented Dec 29, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (d45532b) 84.81% compared to head (b7c5ad4) 87.61%.

Files Patch % Lines
src/sensorpush_ble/parser.py 93.87% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #20      +/-   ##
==========================================
+ Coverage   84.81%   87.61%   +2.80%     
==========================================
  Files           2        2              
  Lines          79      113      +34     
  Branches       16       24       +8     
==========================================
+ Hits           67       99      +32     
- Misses          5        6       +1     
- Partials        7        8       +1     

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

src/sensorpush_ble/parser.py Outdated Show resolved Hide resolved
src/sensorpush_ble/parser.py Show resolved Hide resolved
@ashleigh-hopkins
Copy link
Contributor Author

Hey @bdraco I believe all comments have been addressed and I've added a couple more tests to improve the code coverage

@bdraco
Copy link
Member

bdraco commented Dec 29, 2023

Looks good. I added a few more review comments above

pyproject.toml Outdated Show resolved Hide resolved
src/sensorpush_ble/parser.py Outdated Show resolved Hide resolved
src/sensorpush_ble/parser.py Outdated Show resolved Hide resolved
src/sensorpush_ble/parser.py Outdated Show resolved Hide resolved
src/sensorpush_ble/parser.py Outdated Show resolved Hide resolved
@bdraco
Copy link
Member

bdraco commented Dec 29, 2023

I ordered an HT1 to test with. Should be here sometime after the new year

@bdraco
Copy link
Member

bdraco commented Dec 29, 2023

The ci is really out of date for this library. I'm going to need to fix that before this can be released

@bdraco bdraco changed the title Add support for HT1 feat: add support for HT1 Dec 29, 2023
@bdraco bdraco merged commit 7b76e6d into Bluetooth-Devices:main Dec 29, 2023
8 of 9 checks passed
@bdraco
Copy link
Member

bdraco commented Dec 29, 2023

Thanks @ashleigh-hopkins

@bdraco
Copy link
Member

bdraco commented Dec 29, 2023

https://pypi.org/project/sensorpush-ble/ 1.6.1 published

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.

None yet

2 participants