home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.48k stars 29.41k forks source link

New ozw cover.py seems to be missing SUPPORT_STOP #38018

Closed acw0123 closed 3 years ago

acw0123 commented 4 years ago

The problem

The new cover.py (see https://github.com/home-assistant/core/pull/37217) is showing cover (e.g. shutters / blinds) in ozw which is a great improvement. Unfortunately it is missing the "SUPPORT_STOP" option (it only has SUPPORT_OPEN and SUPPORT_CLOSE thus only showing "up" and "down" in the entities of a ozw-zwave cover device. The same z-wave device (e.g. Fibaro Roller 3) provides a "SUPPORT_STOP" option when using the older zwave (non-beta) integration.

Environment

Problem-relevant configuration.yaml

not applicable

Traceback/Error logs

not applicable

Additional information

Screenshot 2020-07-20 at 14 57 49
MartinHjelmare commented 4 years ago

Yes, stop is not yet implemented. We'd be happy to receive a pull request adding support and tests for that feature.

probot-home-assistant[bot] commented 4 years ago

Hey there @cgarwood, @marcelveldt, mind taking a look at this issue as its been labeled with an integration (ozw) you are listed as a codeowner for? Thanks! (message by CodeOwnersMention)

wladwnt commented 3 years ago

My HA/python development is very limited, but as I could understand from the Dump and JSON the cover is implemented in openzwave as a CLASS_SWITCH_MULTILEVEL. So, if my understanding is correct, open and close is initiated by set position to 0 and 100. Once cover start mooving, the is no direct possibiility to stop it since SWITCH_MULTILEVEL has no stop option (that make sense for real switches, but not sufficient for covers since they are not really multilevel switches but go through all position to reach goal position). So I could not identify any MQTT topic that could be used to stop the cover movement. If it is so, first there would be a need for changig openzwave-mqtt code first, and only then it would be possible to implement STOP functin in the home assistant's cover.py.

I would love to do something for that, but definately need some more expirienced advises. Maybe (I hope) I am wrong and it is easier and we do not need changes to openzwave/mqtt.

kpine commented 3 years ago

The zwave integration's covers open/close actions use the OZW Button values, not the Level value. "Press" (set to True) the "open" button to start opening, "release" (set to False) the "open" button to stop opening.

Buttons in qt-openzwave have been fixed in qt-openzwave so this would be implementable now.

clook commented 3 years ago

Currently, https://github.com/cgarwood/python-openzwave-mqtt still does not support OZW button type so it would need to be implemented into also.

kpine commented 3 years ago

There is a Button value type. What else needs to be added? Button values are just True/False. Press button == True, Release button == False.