Feature/type 8#16
Conversation
|
This PR is stale because it has been open 45 days with no activity. |
patman15
left a comment
There was a problem hiding this comment.
Will run a test with my shades next week to see if something breaks.
| pos = int.from_bytes(data[3:5], byteorder="little") | ||
| pos2 = (int(data[5]) << 4) + (int(data[4]) >> 4) | ||
| # Get the last 4 bits of data[4] and shift them 6 places to the left | ||
| last_4_bits = (data[4] & 0b1111) << 6 |
There was a problem hiding this comment.
to me it looks like this decoding is changed and not necessarily in a compatible way. Could be that my shade and yours use different format. Need to investigate more.
| async def set_position(self, value: int, disconnect: bool = True) -> None: | ||
| async def set_position( | ||
| self, | ||
| pos1: int, |
There was a problem hiding this comment.
I think the parameters pos1-pos3, tilt, velocity should go into a dataclass.
| ): | ||
| return | ||
| self._target_position = round(target_position) | ||
| self._target_position = round(target_position) |
|
Any progress? Or can I run both integrations side by side - control my type 8 with this branch and the rest with main ? |
|
I did some code clean-up of the main branch over the holidays, but I haven't seen feedback from the author of this PR. I need to get the changes sorted out and merged individually, because I still suspect that it modifies the non-type-8 shades. |
Hopefully this doesn't break all the non-type-8 blinds; I don't have any so I cannot check :/