Skip to content

Commit

Permalink
fix: TypeError when modelNumber is None
Browse files Browse the repository at this point in the history
  • Loading branch information
rokam authored May 23, 2024
1 parent 325369f commit 10945e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion midealocal/cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ async def list_appliances(self, home_id) -> dict | None:
for appliance in room.get("applianceList"):
try:
model_number = int(appliance.get("modelNumber", 0))
except ValueError:
except (ValueError, TypeError):
model_number = 0
device_info = {
"name": appliance.get("name"),
Expand Down

0 comments on commit 10945e7

Please sign in to comment.