-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Invert direction for Smartwings shades #8681
Conversation
356be75
to
b8aea08
Compare
Inspired by ZHA's approach, and feedback form SmartWings support, I confirmed that this converter works and am now proposing that we merge it to the main codebase. For shades to work well, you still need to invert their Zigbee state (press Up & Down together for 5s, then Press the P button under the battery cover once).
3272f66
to
9a1a5a9
Compare
Thanks! |
@@ -13,7 +26,7 @@ const definitions: DefinitionWithExtend[] = [ | |||
vendor: 'Smartwings', | |||
description: 'Roller shade', | |||
fromZigbee: [fz.cover_position_tilt, fz.battery], | |||
toZigbee: [tz.cover_state, tz.cover_position_tilt], | |||
toZigbee: [tzLocal.backwards_cover_state, tz.cover_position_tilt], | |||
meta: {battery: {dontDividePercentage: true}, coverInverted: true}, |
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.
After this update depending on if the shade has the motor direction reversed or not the shade either has the state and open/close percentage reversed or the buttons are reversed (close opens the shade, open closes the shade). With the other inversions done in this change should coverInverted
also be inverted from true
to false
to correct the state?
I opened and issue for this here(before finding this PR): Koenkk/zigbee2mqtt#26133
This merge should have been a UI toggle so that users that have already flipped the Smartwings 'app' direction using the remote can revert this forced change. Everyone that has done this has woken up to broken shades now. This 'fix' is only useful for new adopters of Smartwing shades as they won't have to go through the 'app' direction flip procedure. |
This change has now caused someone to have physical damage done to their blinds, Koenkk/zigbee2mqtt#26133 (comment). Seems like it should be reverted asap until a better solution can be implemented that won't possibly harm peoples devices and that hopefully doesn't cause everyone already using these shades and blinds to have to factory reset them to have them work correctly and have the remotes function as expected(which is required to get the remotes to function correctly otherwise just switching motor will suffice). |
@Koenkk as @brettmiller described this PR in it's current form introduces internally inconsistent behavior, and should be reverted ASAP as it risks causing physical damage until a fix is introduced. @quadcom this toggle exists under the "Settings (specific)" of the device's tab. Also it needs to be said this sort of tone particularly helpful in an OSS project. FYI: @Korri |
The last instruction on adding the shades to HA (or any other app) is to "Once the shade is successfully paired with Home Assistant, follow the steps below to ensure that the control command directions on Home Assistant match those on the remote control."
PS: That last comment was tone |
Reverted! Changes will be available in the dev branch in a few hours from now and in the next release which is every 1st of the month. |
I am going to add this here too. I have 4 sets of shades, 1 I bought months before the other 3. |
Inspired by ZHA's approach, and feedback form SmartWings support, I confirmed that this converter works and am now proposing that we merge it to the main codebase.
For shades to work well, you still need to invert their Zigbee state (press Up & Down together for 5s, then Press the P button under the battery cover once).
Fixes Koenkk/zigbee2mqtt#22847
The above issue is where I got the external converter code from, I slightly adjusted it to be more consistent with the code in this repository, but logic should be identical.
ZHA's pull request for those shades has a lot of investigation and context on them: zigpy/zha-device-handlers#2220