mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 07:07:28 +00:00
Fix implicit-return in google_assistant (#123002)
This commit is contained in:
parent
b609f8e962
commit
1eadb00fce
@ -878,6 +878,8 @@ class StartStopTrait(_Trait):
|
|||||||
if domain in COVER_VALVE_DOMAINS:
|
if domain in COVER_VALVE_DOMAINS:
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
raise NotImplementedError(f"Unsupported domain {domain}")
|
||||||
|
|
||||||
def query_attributes(self):
|
def query_attributes(self):
|
||||||
"""Return StartStop query attributes."""
|
"""Return StartStop query attributes."""
|
||||||
domain = self.state.domain
|
domain = self.state.domain
|
||||||
@ -898,13 +900,17 @@ class StartStopTrait(_Trait):
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
raise NotImplementedError(f"Unsupported domain {domain}")
|
||||||
|
|
||||||
async def execute(self, command, data, params, challenge):
|
async def execute(self, command, data, params, challenge):
|
||||||
"""Execute a StartStop command."""
|
"""Execute a StartStop command."""
|
||||||
domain = self.state.domain
|
domain = self.state.domain
|
||||||
if domain == vacuum.DOMAIN:
|
if domain == vacuum.DOMAIN:
|
||||||
return await self._execute_vacuum(command, data, params, challenge)
|
await self._execute_vacuum(command, data, params, challenge)
|
||||||
|
return
|
||||||
if domain in COVER_VALVE_DOMAINS:
|
if domain in COVER_VALVE_DOMAINS:
|
||||||
return await self._execute_cover_or_valve(command, data, params, challenge)
|
await self._execute_cover_or_valve(command, data, params, challenge)
|
||||||
|
return
|
||||||
|
|
||||||
async def _execute_vacuum(self, command, data, params, challenge):
|
async def _execute_vacuum(self, command, data, params, challenge):
|
||||||
"""Execute a StartStop command."""
|
"""Execute a StartStop command."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user