Skip to content

Commit

Permalink
fix: make sure key exists in data
Browse files Browse the repository at this point in the history
Signed-off-by: Chris <firstof9@gmail.com>
  • Loading branch information
firstof9 committed Nov 9, 2022
1 parent 2d4d045 commit 3aeac55
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 3aeac55

Please sign in to comment.