Skip to content

Commit

Permalink
Fix flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
smmoroz committed Jan 9, 2024
1 parent f2a051f commit e993781
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions miio/integrations/zhimi/humidifier/airhumidifier_miot_ca6.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,7 @@ def water_level(self) -> Optional[int]:
0 - empty/min, 1 - normal, 2 - full/max
"""
water_level = self.data["water_level"]
if water_level == 0:
return 0
elif water_level == 1:
return 50
elif water_level == 2:
return 100
return None
return {0: "0", 1: "50", 2: "100"}.get(water_level)

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

0 comments on commit e993781

Please sign in to comment.