Support google assistant stopping for assumed state covers (#44266)
* Support stopping for assumed state covers * Adjust black formatting
This commit is contained in:
parent
067f2d0098
commit
3de0610909
2 changed files with 28 additions and 3 deletions
|
@ -648,7 +648,14 @@ class StartStopTrait(_Trait):
|
|||
"""Execute a StartStop command."""
|
||||
if command == COMMAND_STARTSTOP:
|
||||
if params["start"] is False:
|
||||
if self.state.state in (cover.STATE_CLOSING, cover.STATE_OPENING):
|
||||
if (
|
||||
self.state.state
|
||||
in (
|
||||
cover.STATE_CLOSING,
|
||||
cover.STATE_OPENING,
|
||||
)
|
||||
or self.state.attributes.get(ATTR_ASSUMED_STATE)
|
||||
):
|
||||
await self.hass.services.async_call(
|
||||
self.state.domain,
|
||||
cover.SERVICE_STOP_COVER,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue