As discussed in Does ZHA not support tilt for covers/blinds? ZHA does not support tilt for covers currently. It would be great if that would be supported, since it is a quite basic feature in my opinion.
For reference, there is more related discussions here about the request and workarounds to tilt cover:
@cremor Maybe this should also be submitted to issues for Home Assistant core as well or?
https://github.com/home-assistant/core/issues
cover.py for zha component inside Home Assistant core looks to be missing tilt for covers?
https://github.com/home-assistant/core/tree/dev/homeassistant/components/cover
So need to extend cover support for tilt in cover.py for zha component inside Home Assistant core?
Could look at the other integrations/components that already include tilt and copy missing lines to zha?
And would of course also have to be tested by someone with access to cover devices with tilt function.
For comparison can look at some of the other components in Home Assistant core that implemented tilt:
Other components already including tilt for cover are; deconz, somfy, esphome, knx, rfxtrx, and more:
Yes, this is where the implementation is missing.
The Home Assistant Github issue tracker is only used for bugs. For feature requests it links to this forum.
I do have a Zigbee cover device that supports tilt, so I can test.
Have made changes in zha cover function. It wasn’t very difficult. Works fine, but not ready for integrate yet. I testet with Nexentro zigbee cover modul.
https://github.com/home-assistant/core/compare/dev…josef109:home-assistant_core:zha-cover_tilt
Great, thanks!
Please let me know if I can help in any way! But I also only own the Nexentro Blinds Actuator Mini, so I assume we have the same hardware.
A few things that I noticed about your changes:
- Redundant check, maybe copy paste error, here: Comparing home-assistant:dev...josef109:zha-cover_tilt · home-assistant/core · GitHub
-
async_open_cover_tilt
,async_close_cover_tilt
andasync_stop_cover_tilt
seem to do the same as the existing open/close/stop methods. Not yet implemented?
On zigbee cluster side there is no separate tilt command for up, down and stop. So now i changed it width “go_to_tilt_percentage” for up and down. Actually only the state is not working perfect.
@cremor: please test the changes
How can I test the changes? I don’t have any experience with Home Assistant development, or even Python development in general. Also, I only own a single Zigbee stick, so I’d have to test this with my real HA system I assume? I’m running it on a Raspberry Pi.
Btw, this line still looks like an error: Comparing home-assistant:dev...josef109:zha-cover_tilt · home-assistant/core · GitHub
I own a lot of Nexentro Blind Actuators so it would be amazing getting tilt positioning to work. I also can test if you give an explanation how. Thanks a lot for your effort @josef109
ok, i explain:
go to “[GitHub - josef109/home-assistant_core at zha-cover_tilt]”. Download the branch as zip or clone it.
Copy the complete homeassistant/components/zha directory to your device under config/custom_components. Add the line
“version”: “v1.2.3”
to /config/custom_components/zha/manifest.json. Restart the device. Check the logfile.
If you have no custom components use google to enable:
in the log file there should be a warning if the zha custom component work:
WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration zha which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
Will this custom component then replace the “original” ZHA? And will it take over the existing ZHA configuration?
Can we go back to the “original” ZHA by just deleting the custom component folder again?
yes, correct
Do you plan on submitting this as patch to upstream ZHA as a pull request for the Home Assistant core?
We’ll see, but I have first to modify the tests for the changes
I’ve now tested it at commit 9755570. The controls seem to all work fine, thanks!
The only problems I noticed are about the data that HA is showing:
- The shown tilt position (
current_tilt_position
) isn’t updated very often. For sure less often than the cover position (current_position
).
Sometimes it even stays at old values forever. For example, I just closed my cover andcurrent_tilt_position
is still at 20, but should be reported as 0.
But I don’t know if this is something you have control over, or if the devices just don’t send that data very often.- It seems like this also affects the “toggle tilt” command. If you execute it too soon after a previous execution finished, it will do nothing.
- The cover state only stays in “opening” or “closing” state for a short while (maybe just as long as the tilt position is changing) and then shows “open” again, even though the cover is still moving (and
current_position
is still changing).
I also tested 9755570 today and have to say, it is working really well. Also the wall mounted buttons are still working and tilt position is precisely reported. Really good work.
@cremor: are you using the latest Nexentro Firmware
Yes, my devices use firmware version 0.0.52.5 and there is no update offered.
About the tilt position updates: The Nextentro Config app (which uses Bluetooth) shows tilt position updates way more often than HA.
bluetooth and zigbee are two completely independent interfaces. I think it is clear that the controller itself has the exact position. Whether it also communicates it, I can not say yet. Often the last position does not come through. It may be due to zigpy or the controller. I will check with the zigbee sniffer.
I just saw that you created a pull request, thanks!
Did you find out anything about the tilt position update frequency?
@josef109 Is “tilt” and “lift” the same attribute in ZCL Window Covering cluster are “Tilt” and “Lift” separate attributes and if so should not Home Assistant’s cover component really support them as different device actions?
Reference: