mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 11:47:06 +00:00
Improve vacuum type hints (#76747)
* Improve vacuum type hints * Black * Black * Adjust * One more
This commit is contained in:
parent
8a85881ca0
commit
4f9e6d2407
@ -114,7 +114,7 @@ SUPPORT_START = 8192
|
|||||||
|
|
||||||
|
|
||||||
@bind_hass
|
@bind_hass
|
||||||
def is_on(hass, entity_id):
|
def is_on(hass: HomeAssistant, entity_id: str) -> bool:
|
||||||
"""Return if the vacuum is on based on the statemachine."""
|
"""Return if the vacuum is on based on the statemachine."""
|
||||||
return hass.states.is_state(entity_id, STATE_ON)
|
return hass.states.is_state(entity_id, STATE_ON)
|
||||||
|
|
||||||
@ -286,13 +286,19 @@ class _BaseVacuum(Entity):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def send_command(
|
def send_command(
|
||||||
self, command: str, params: dict | list | None = None, **kwargs: Any
|
self,
|
||||||
|
command: str,
|
||||||
|
params: dict[str, Any] | list[Any] | None = None,
|
||||||
|
**kwargs: Any,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Send a command to a vacuum cleaner."""
|
"""Send a command to a vacuum cleaner."""
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
async def async_send_command(
|
async def async_send_command(
|
||||||
self, command: str, params: dict | list | None = None, **kwargs: Any
|
self,
|
||||||
|
command: str,
|
||||||
|
params: dict[str, Any] | list[Any] | None = None,
|
||||||
|
**kwargs: Any,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Send a command to a vacuum cleaner.
|
"""Send a command to a vacuum cleaner.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user