✨ Feature: Added support for button based cover controls #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces the
is_button
variable to the cover configuration. When set to true, this simulates a momentary button press, where the associated switch is temporarily set to a high state, as opposed to flipping a persistent switch.Rationale
This feature is beneficial for remote-controlled window covers that have been adapted for HomeAssistant integration. These covers typically expect button presses for operation and only stop when a dedicated stop button is pressed. This PR enables the simulation of such button presses, making the integration compatible for these types of setups.
Changes
is_button
configuration option for all covers. It defaults tofalse
to preserve compatibility with existing configurations._async_handle_command
function to turn off the switch after 1 second of activation, simulating a button press. This is only enabled for covers whereis_button
is set totrue
.