mirror of
https://github.com/home-assistant/core
synced 2024-08-15 18:25:44 +02:00
Correct typing of async_track_state_change (#79150)
* Correct typing of async_track_state_change * Update integrations
This commit is contained in:
parent
4fcd0f3e23
commit
7ead77eea6
@ -157,9 +157,12 @@ class Proximity(Entity):
|
||||
return {ATTR_DIR_OF_TRAVEL: self.dir_of_travel, ATTR_NEAREST: self.nearest}
|
||||
|
||||
def check_proximity_state_change(
|
||||
self, entity: str, old_state: State | None, new_state: State
|
||||
self, entity: str, old_state: State | None, new_state: State | None
|
||||
) -> None:
|
||||
"""Perform the proximity checking."""
|
||||
if new_state is None:
|
||||
return
|
||||
|
||||
entity_name = new_state.name
|
||||
devices_to_calculate = False
|
||||
devices_in_zone = ""
|
||||
|
@ -141,7 +141,9 @@ def threaded_listener_factory(
|
||||
def async_track_state_change(
|
||||
hass: HomeAssistant,
|
||||
entity_ids: str | Iterable[str],
|
||||
action: Callable[[str, State | None, State], Coroutine[Any, Any, None] | None],
|
||||
action: Callable[
|
||||
[str, State | None, State | None], Coroutine[Any, Any, None] | None
|
||||
],
|
||||
from_state: None | str | Iterable[str] = None,
|
||||
to_state: None | str | Iterable[str] = None,
|
||||
) -> CALLBACK_TYPE:
|
||||
|
Loading…
Reference in New Issue
Block a user