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

add srain_piezo of WS90 for rain state detection #1115

Merged
merged 3 commits into from
Oct 8, 2024
Merged

Conversation

dkadioglu
Copy link
Contributor

@dkadioglu dkadioglu commented Sep 29, 2024

Adds rain state detection, which is available since GW2000 firmware 3.1.5

Fixes #1102

Checklist:

  • Confirm that one or more new tests are written for the new functionality.
  • Run tests and ensure everything passes (with 100% test coverage).
  • Update README.md with any new documentation.

@dkadioglu
Copy link
Contributor Author

What tests should I implement for srain_piezo to achieve successful checks?

@bachya
Copy link
Owner

bachya commented Oct 2, 2024

What tests should I implement for srain_piezo to achieve successful checks?

I would take a look at these tests as inspiration: #1115 (comment)

@dkadioglu
Copy link
Contributor Author

What tests should I implement for srain_piezo to achieve successful checks?

I would take a look at these tests as inspiration: #1115 (comment)

Thank you for giving me some hint. However, this link seems to be wrong.

@bachya
Copy link
Owner

bachya commented Oct 2, 2024

What tests should I implement for srain_piezo to achieve successful checks?

I would take a look at these tests as inspiration: #1115 (comment)

Thank you for giving me some hint. However, this link seems to be wrong.

Apologies! https://github.com/bachya/ecowitt2mqtt/blob/dev/tests/data/test_data_processing.py

Copy link

codecov bot commented Oct 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (cbbe355) to head (46ce90e).
Report is 2 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev     #1115   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           32        33    +1     
  Lines         1775      1789   +14     
=========================================
+ Hits          1775      1789   +14     

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

@dkadioglu
Copy link
Contributor Author

It took me some time familiarising with pytest and the CI pipeline. I hope, my implementation is appropriate. From my point of view, this should be ready to merge, please check.

Copy link
Owner

@bachya bachya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks so much!

@bachya bachya merged commit 3e89bd3 into bachya:dev Oct 8, 2024
10 of 11 checks passed
@bachya bachya added the enhancement Enhancement of the code, not introducing new features. label Oct 8, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Oct 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Enhancement of the code, not introducing new features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New srain_piezo of WS90 and GW2000 on 3.1.5 wrongly transmitted
2 participants