Added time left for recommended sensor cleaning#119
Merged
rytilahti merged 5 commits intorytilahti:masterfrom Nov 17, 2017
Merged
Added time left for recommended sensor cleaning#119rytilahti merged 5 commits intorytilahti:masterfrom
rytilahti merged 5 commits intorytilahti:masterfrom
Conversation
Unfortunately I am unable to test these changes, however I believe they should work.
houndci-bot
reviewed
Nov 16, 2017
miio/vacuumcontainers.py
Outdated
| @property | ||
| def sensor_dirty_left(self) -> timedelta: | ||
| return self.side_brush_total - self.sensor_dirty | ||
|
|
miio/vacuumcontainers.py
Outdated
| self.main_brush_total = timedelta(hours=300) | ||
| self.side_brush_total = timedelta(hours=200) | ||
| self.filter_total = timedelta(hours=150) | ||
| self.sensors_total = timedelta(hours=30) |
Github browser based editor sucks!
rytilahti
requested changes
Nov 17, 2017
miio/vacuumcontainers.py
Outdated
| self.main_brush_total = timedelta(hours=300) | ||
| self.side_brush_total = timedelta(hours=200) | ||
| self.filter_total = timedelta(hours=150) | ||
| self.sensors_total = timedelta(hours=30) |
Owner
There was a problem hiding this comment.
Use singular here, as property is "sensor_dirty". Or if you thing it's worth renaming it now, maybe introduce a new, renamed property and @deprecate the old one.
Contributor
Author
There was a problem hiding this comment.
Thanks for taking the time to have a look. I have fixed the issues.
miio/vacuumcontainers.py
Outdated
|
|
||
| @property | ||
| def sensor_dirty_left(self) -> timedelta: | ||
| return self.side_brush_total - self.sensor_dirty |
6 tasks
rytilahti
reviewed
Nov 17, 2017
| @property | ||
| def sensor_dirty_left(self) -> timedelta: | ||
| return self.side_brush_total - self.sensor_dirty | ||
| return self.sensor_dirty_total - self.sensor_dirty |
Owner
There was a problem hiding this comment.
This is still wrong :-) Also, please update vacuum_cli.py accordingly to display the new property.
1 similar comment
Contributor
Author
|
I am far from a programmer. Hope this is everything done correctly:) Thanks for your patience. |
Owner
|
Seems to work fine, I just tested it locally :-) (cleaning the sensors / reseting the status is overdue, it seems..) |
rytilahti
approved these changes
Nov 17, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unfortunately I am unable to test these changes, however I believe they should work.