Skip to content

Commit 1413c1f

Browse files
authored
fix: crash on checking humidifier adv (#125)
1 parent cfc6c68 commit 1413c1f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

switchbot/adv_parsers/humidifier.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
# High: 658000c5642b6300
1616
def process_wohumidifier(data: bytes, mfr_data: bytes | None) -> dict[str, bool | int]:
1717
"""Process WoHumi services data."""
18-
assert mfr_data is not None
18+
if mfr_data is None:
19+
return {}
1920
_LOGGER.debug("mfr_data: %s", mfr_data.hex())
2021
_LOGGER.debug("data: %s", data.hex())
2122

0 commit comments

Comments
 (0)