Skip to content

Commit

Permalink
Handle exception for unknown devices
Browse files Browse the repository at this point in the history
  • Loading branch information
mnordseth committed Jan 27, 2024
1 parent 96293bd commit 61b546f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion custom_components/enet/aioenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,11 @@ def create_device(client, raw):
log.warning(
"Unknown device: typeID=%s name=%s", raw["typeID"], raw["installationArea"]
)
return Device(client, raw)
try:
return Device(client, raw)
except Exception as e:
log.exception("Failed to create device: typeID=%s name=%s", raw["typeID"], raw["installationArea"])



class Device:
Expand Down

0 comments on commit 61b546f

Please sign in to comment.