Add buttons to Home Connect#138792
Conversation
|
Hey there @DavidMStraub, @MartinHjelmare, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
|
I'm omitting the documentation because I will prepare a pull request that include information about all the possible entities that the integration can provide, and that includes these button entities. |
| appliance, | ||
| # The entity is subscribed to the appliance connected event, | ||
| # but it will receive also the disconnected event | ||
| ButtonEntityDescription( |
There was a problem hiding this comment.
Side note: I think we should refactor how we build the coordinator context and instead have a specific parameter context for that in the HomeConnectEntity. It's confusing to pass an entity description and then not use that as the entity description.
Then we could also refactor this platform and have a single entity class and let the entity description describe how to subscribe for updates, ie what coordinator context to set, and how the press action should call the client.
|
Please at least open a draft docs PR as a placeholder. |
|
As it was easy to add some small description to docs, I decided to add it |
|
Should we deprecate the actions that does the same than these buttons? |
|
Yes. 👍 |
Proposed change
Added button platform with buttons that execute all the commands available* and another button that allows to stop a program.
*: All commands except for "Acknowledge Event", for which I haven't found a really good use case.
Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests: