Skip to content
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

Cover states stays as Opening when issuing the open/up command #366

Open
hennikul opened this issue Jan 28, 2025 · 5 comments
Open

Cover states stays as Opening when issuing the open/up command #366

hennikul opened this issue Jan 28, 2025 · 5 comments

Comments

@hennikul
Copy link

I'm making a Zigbee device to control my garage door. I can control the device fine, all commands work, and state in Home Assistant updates as expected, except that sometimes when I click the "Up/Open" button, it's stuck in "Opening", even when it's 100% open. Sometimes it works though... If I use the position slider and set it to 100% open, it always changes state to "Open" when it's done.

After some googling, I have found other users experiencing the same behavior with other Zigbee Window Coverings, like from IKEA. One post somewhere suggested that the problem is target_lift_position not being updated before the command is issued to the device. This seems to be the case for me as well. It's updated when I use the slider, but when using the Up or Down buttons, it remains unchanged. The stop button seems to update it to the current position.

I guess that self._target.lift_position needs to be updated here:
https://github.com/zigpy/zha/blob/dev/zha/application/platforms/cover/__init__.py#L279
https://github.com/zigpy/zha/blob/dev/zha/application/platforms/cover/__init__.py#L294

Like it's done here:
https://github.com/zigpy/zha/blob/dev/zha/application/platforms/cover/__init__.py#L311

@puddly
Copy link
Contributor

puddly commented Jan 28, 2025

Does your device send attribute updates as the cover is opening? When it fully opens, ZHA should receive an attribute update like current_cover_position=0, indicating that the cover has been fully opened.

I believe this logic should handle it:

if position_or_tilt == 0:

@hennikul
Copy link
Author

Yes, the device reports both current_position_lift (id: 0x0003, value: 0) and current_position_lift_percentage (id: 0x0008, value: 0) in the WindowCovering cluster (id: 0x102). These values have been verified in the administer Zigbee-unit GUI in Home Assistant when the cover is stuck in the Opening state after being fully opened.

@puddly
Copy link
Contributor

puddly commented Jan 29, 2025

Can you upload a debug log of it opening and getting stuck?

@hennikul
Copy link
Author

ha_zigbee_up_command.log

I've uploaded debug log from HA from triggering the up command in the HA UI. State at the end is stuck in Opening.

@TheJulianJES
Copy link
Contributor

Also seems similar to this issue:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants