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

Added time left for recommended sensor cleaning #119

Merged
merged 5 commits into from
Nov 17, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions miio/vacuumcontainers.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def __init__(self, data: Dict[str, Any]) -> None:
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)
self.sensor_total = timedelta(hours=30)

@property
def main_brush(self) -> timedelta:
Expand Down Expand Up @@ -324,7 +324,7 @@ def sensor_dirty(self) -> timedelta:

@property
def sensor_dirty_left(self) -> timedelta:
return self.side_brush_total - self.sensor_dirty
return self.sensor_dirty_total - self.sensor_dirty
Copy link
Owner

Choose a reason for hiding this comment

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

This is still wrong :-) Also, please update vacuum_cli.py accordingly to display the new property.


def __repr__(self) -> str:
return "<ConsumableStatus main: %s, side: %s, filter: %s, sensor dirty: %s>" % ( # noqa: E501
Expand Down