jheling / freeathome

Free@Home component for Home Assistant
103 stars 37 forks source link

Add support for forced position to covers #70

Closed Tho85 closed 3 years ago

Tho85 commented 3 years ago

Cover actuators support a function called "forced position" ("Zwangsstellung"). You can basically force covers to stay open or closed and ignore other position commands. When enabled, neither f@h sensors nor HA commands can change the position of that cover until the forced position is reset to normal. When disabled, the cover returns to its previous position. This is useful for example if you have a window sensor attached and would like the cover to stay open as long as the window is open.

Input/output datapoint is idp0004/odp0004, the values are: Forced position disabled (state): 0 Disable forced position (command): 1 Forced position up: 2 Forced positoin down: 3

The HA cover entity does not support this kind of functionality. Since no other cover integration seems to support something similar, I doubt HA core would add this functionality for a custom component. So the workaround is to define two new switches per cover, <cover name> force up and <cover name> force down.

jheling commented 3 years ago

Good work!