Skip to content

Commit

Permalink
vacuum: return none on is_water_box_attached if unsupported (#1178)
Browse files Browse the repository at this point in the history
  • Loading branch information
rytilahti committed Nov 3, 2021
1 parent 506247e commit 9b099b5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions miio/integrations/vacuum/roborock/vacuumcontainers.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,11 @@ def is_on(self) -> bool:
)

@property
def is_water_box_attached(self) -> bool:
def is_water_box_attached(self) -> Optional[bool]:
"""Return True is water box is installed."""
return "water_box_status" in self.data and self.data["water_box_status"] == 1
if "water_box_status" in self.data:
return self.data["water_box_status"] == 1
return None

@property
def is_water_box_carriage_attached(self) -> Optional[bool]:
Expand Down

0 comments on commit 9b099b5

Please sign in to comment.