-
-
Notifications
You must be signed in to change notification settings - Fork 7
Feature/type 8 #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trailing spaces
|
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 :/