Skip to content

Commit

Permalink
fix: make sure key exists in data
Browse files Browse the repository at this point in the history
  • Loading branch information
firstof9 authored Nov 9, 2022
2 parents 2d4d045 + 3aeac55 commit 72637b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/openevse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ async def get_firmware(manager: OpenEVSEManager) -> tuple:
except MissingSerial as error:
_LOGGER.info("Missing serial number data, skipping...")

if data is not None:
if data is not None and "model" in data:
if data["model"] != "unknown":
return data["model"], manager.wifi_firmware

Expand Down

0 comments on commit 72637b5

Please sign in to comment.