Skip to content

Commit

Permalink
Add quirk fix for double-oh values (#1438)
Browse files Browse the repository at this point in the history
  • Loading branch information
rytilahti authored Jun 17, 2022
1 parent 4912fcd commit 85e30f6
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 85e30f6

Please sign in to comment.