Skip to content

Commit

Permalink
Add quirk fix for double-oh values
Browse files Browse the repository at this point in the history
  • Loading branch information
rytilahti committed Jun 17, 2022
1 parent 4912fcd commit 28778d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions miio/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ def _decode(self, obj, context, path):
lambda decrypted_bytes: decrypted_bytes[: decrypted_bytes.rfind(b"\x00")]
if b"\x00" in decrypted_bytes
else decrypted_bytes,
# fix double-oh values for 090615.curtain.jldj03, ##1411
lambda decrypted_bytes: decrypted_bytes.replace(
b'"value":00', b'"value":0'
),
]

for i, quirk in enumerate(decrypted_quirks):
Expand Down

0 comments on commit 28778d4

Please sign in to comment.