mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
Fix implicit-return in command_line (#122838)
This commit is contained in:
parent
70e368a57e
commit
b4cba01870
@ -4,7 +4,7 @@ from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
from datetime import datetime, timedelta
|
||||
from typing import TYPE_CHECKING, Any, cast
|
||||
from typing import Any, cast
|
||||
|
||||
from homeassistant.components.cover import CoverEntity
|
||||
from homeassistant.const import (
|
||||
@ -145,7 +145,6 @@ class CommandCover(ManualTriggerEntity, CoverEntity):
|
||||
if self._command_state:
|
||||
LOGGER.info("Running state value command: %s", self._command_state)
|
||||
return await async_check_output_or_log(self._command_state, self._timeout)
|
||||
if TYPE_CHECKING:
|
||||
return None
|
||||
|
||||
async def _update_entity_state(self, now: datetime | None = None) -> None:
|
||||
|
@ -4,7 +4,7 @@ from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
from datetime import datetime, timedelta
|
||||
from typing import TYPE_CHECKING, Any, cast
|
||||
from typing import Any, cast
|
||||
|
||||
from homeassistant.components.switch import ENTITY_ID_FORMAT, SwitchEntity
|
||||
from homeassistant.const import (
|
||||
@ -147,7 +147,6 @@ class CommandSwitch(ManualTriggerEntity, SwitchEntity):
|
||||
if self._value_template:
|
||||
return await self._async_query_state_value(self._command_state)
|
||||
return await self._async_query_state_code(self._command_state)
|
||||
if TYPE_CHECKING:
|
||||
return None
|
||||
|
||||
async def _update_entity_state(self, now: datetime | None = None) -> None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user