Fix cover stop feature is not always available in google_assistant#106362
Fix cover stop feature is not always available in google_assistant#106362jbouwh wants to merge 1 commit into
Conversation
|
Hey there @home-assistant/cloud, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
elupus
left a comment
There was a problem hiding this comment.
I don't like this. We should only show stop if its running or unknown. Stop make no sense otherwise. I dont understand what you are trying to fix.
There are several reasons for this fix:
So this PR solves showing a |
|
Yes, but you can still ask verbally to stop. We make use of these "is playing" and others for media players to decide what buttons to show in normal UI. It make perfectly sense for google UI to respect such things too. If a cover is moving it should indicate running, with button showing. If its stand still, stop does not make sense so button should not be visible. If cover uses stop for something else, that is a bug in the cover integration. Start make a slot of sense, start opening if closed, start closing when open... |
I am sorry, but I cannot follow you. It is not possible to hide buttons unfortunately, but showing start assumes that a a user can start it, which is not the case. You assumptions on what cover |
|
Again why is stop not exposed? You cant stop a non running cover... Start a non running cover is just an implementation detail in the integration... |
|
But maybe we are missing start feature now that i think about it in the google wrapper. It should open/close a cover based on is closed. |
We could in fact call |
|
|
Superseded by #106378 |

Proposed change
When a cover entity that supports the stop was exposed to google_assistant, it only worked in an assumed state,
openingorclosingstate. In other states it would show a start button, but that does not make sense.To determine if stop is supported is up to the integration. This PR changes the behavior of the
StartStopcontrol to always showStopby reportingTrueon theisRunningstate toogoogle_assistant.The same pattern was used for the
valveimplementation, so now the tests have been combined.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..coveragerc.To help with the load of incoming pull requests: