Open archerne opened 2 years ago
Hey there @esphome/core, mind taking a look at this issue as it has been labeled with an integration (cover
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
This might be just setting the supported actions instead of setting supported features directly. Here is how MyQ does it and their integration has no stop button, just up and down. https://github.com/home-assistant/core/blob/dev/homeassistant/components/myq/cover.py
I have the exact same issue
Just ran into this today too
Hey there!
Total newb here. I took a stab at implementing this. Does anybody want to help me bring it to the fruition?
Here are the PRs:
Hi, I am using the cover platform to control a valve but the valve doesn't support a stop function. This issue would make my device work. Are the PRs completed? Thanks.
I think the third PR depends on the changes from the second one, and I'll probably need a bit of help polishing off the last bit of it.
Woohoo, great success!
Many thanks to @jesserockz for helping, reviewing and getting this merged!
I think this issue can be closed as complete now :)
Thanks for taking this on @amomchilov. I just looked into how I can take advantage of set_supports_stop, but looks like the only current way is to create a custom cover sensor, and use this new function in the C++ header file.
I am using a template cover entity in my setup, and I was hoping this would be a simple parameter like supports_stop: false
in the YAML file. Any thoughts on this? Or can you think of how I can make use of this without having to create a whole new custom cover entity?
It's been a while since I first wrote this code, but from I can tell, there's nothing specific to template covers here.
The Python script reading your YAML will configure the supports_stop
trait automatically based on whether your cover has a stop action.
If you have no stop action, and you still see the stop button, double check that you're running the latest versions of Home Assistant, ESPHome and the firmware on your device (this feature required updates to all 3 of these).
works great for me
cover:
- platform: template
device_class: garage
id: "side_garage_door_cover"
name: "Side Garage Door"
has_position: false
open_action:
- switch.turn_on: side_garage_relay
- delay: 0.1s
- switch.turn_off: side_garage_relay
- cover.template.publish:
id: side_garage_door_cover
current_operation: OPENING
- delay: 45s
- cover.template.publish:
id: side_garage_door_cover
state: OPEN
current_operation: IDLE
close_action:
- switch.turn_on: side_garage_relay
- delay: 0.1s
- switch.turn_off: side_garage_relay
- cover.template.publish:
id: side_garage_door_cover
current_operation: CLOSING
- delay: 45s
- cover.template.publish:
id: side_garage_door_cover
state: CLOSED
current_operation: IDLE
assumed_state: false
Another issue that's related to this.
Cover button states are not dependent on CoverOperation
■ button is always enabled (when stop_action
is set) regardless of the cover state and operation (even when COVER_OPERATION_IDLE
)
■ button is expected to be
COVER_OPERATION_IDLE
CoverOperation
is either COVER_OPERATION_OPENING
or COVER_OPERATION_CLOSING
)↑ button is enabled during COVER_OPERATION_CLOSING
↓ button is enabled during COVER_OPERATION_OPENING
↑ and ↓ buttons are expected to be
COVER_OPERATION_IDLE
CoverOperation
is either COVER_OPERATION_OPENING
or COVER_OPERATION_CLOSING
)Hey @wernerhp, good point, the stop button being enabled while idle is odd indeed.
Those are related but quite distinct issues, could you please open up a new issue for them? (This thread is full of people looking to get rid of the stop button, so its state wouldn't be relevant to them.)
The problem
If no "stop_action" is set in a cover template ESPHome should pass a "supported_features: 3" instead of "supported_features: 11" so that there is no stop button in Home Assistant.
Which version of ESPHome has the issue?
2022.2.1
What type of installation are you using?
Home Assistant Add-on
Which version of Home Assistant has the issue?
2022.2.8
What platform are you using?
ESP8266
Board
D1 Mini
Component causing the issue
cover
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
No response