Skip to content

Commit

Permalink
fix: TypeError when modelNumber is None (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
rokam authored May 23, 2024
1 parent 325369f commit f2855e7
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 f2855e7

Please sign in to comment.