Skip to content

Commit

Permalink
fix: TypeError when modelNumber is None (#16)
Browse files Browse the repository at this point in the history
* Update cloud.py

* Update cloud.py
  • Loading branch information
Flying-Tom authored May 22, 2024
1 parent 9b75ec4 commit eb1a48b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/midea_ac_lan/midea/core/cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,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 eb1a48b

Please sign in to comment.