Skip to content

Commit 7c29389

Browse files
authored
Update __init__.py
Limit version parsing to major, minor and patch digits, other items are discarded.
1 parent 4218153 commit 7c29389

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

custom_components/openhasp/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ async def statusupdate_message_received(msg):
417417
try:
418418
message = HASP_STATUSUPDATE_SCHEMA(json.loads(msg.payload))
419419

420-
major, minor, _ = message["version"].split(".")
420+
major, minor, patch = message["version"].split(".")[:3]
421421
if (major, minor) != (MAJOR, MINOR):
422422
_LOGGER.warning(
423423
"%s firmware mismatch %s <> %s",

0 commit comments

Comments
 (0)