-
Notifications
You must be signed in to change notification settings - Fork 10
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
Use configured weather adjustment when running program #80
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #80 +/- ##
==========================================
+ Coverage 69.42% 70.75% +1.33%
==========================================
Files 4 4
Lines 870 872 +2
==========================================
+ Hits 604 617 +13
+ Misses 266 255 -11
☔ View full report in Codecov by Sentry. |
What do you think about taking it a bit further and pass it as a param to the Then we can update the HA integration service to have the option to pass the flag too. Thanks for this |
Yeah that makes sense,. I will work on the adjustment and update the pull request. Will use a parameter called uwt with default value None on both I see coverage is failing but not really sure how to add unit tests for these functions though |
for the tests, you need to run a dcoker container with the OS firmware and run the https://github.com/vinteo/py-opensprinkler/blob/master/.travis.yml |
Kudos, SonarCloud Quality Gate passed! |
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.
LGTM, just some minor linting things
cfce80b
to
8a59531
Compare
Quality Gate passedIssues Measures |
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.
Seems fine.
Thank you! |
Hi,
I use the home assistant integration when you manually run a program it always defaults to not use the water level and runs all stations at 100% level.
This is due to the uwt flag hard coded to 0 in the program run code
Changing it to
params = {"pid": self._index, "uwt": int(self.use_weather_adjustments)}
allows it to follow what is configured in the open sprinkler program.Fixes #79