Skip to content

Commit

Permalink
reverse byte order of TuyaReverseStruct due to zigpy#1984
Browse files Browse the repository at this point in the history
  • Loading branch information
Shulyaka committed Dec 5, 2022
1 parent 7b3fd39 commit c811f2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/test_tuya_mcu.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,4 +259,4 @@ class Test(TuyaReverseStruct):
first: t.uint8_t
second: t.uint16_t

assert Test(1, 0x0203).serialize() == b"\x03\x02\x01"
assert Test(1, 0x0203).serialize() == b"\x01\x02\x03"
2 changes: 1 addition & 1 deletion zhaquirks/tuya/mcu/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def serialize(self) -> bytes:
self.fields.reverse()
result = super().serialize()
self.fields.reverse()
return result
return result[::-1]


class TuyaPowerConfigurationCluster(
Expand Down

0 comments on commit c811f2f

Please sign in to comment.