mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Switch async_track_same_state to use async_call_later (#99219)
* Switch async_track_same_state to use async_call_later There was no need to use async_track_point_in_utc_time here since we only need a delay * update trigger tests * remove some more utcnow patching * remove some more utcnow patching * remove some more utcnow patching
This commit is contained in:
@@ -1327,9 +1327,7 @@ def async_track_same_state(
|
||||
if not async_check_same_func(entity, from_state, to_state):
|
||||
clear_listener()
|
||||
|
||||
async_remove_state_for_listener = async_track_point_in_utc_time(
|
||||
hass, state_for_listener, dt_util.utcnow() + period
|
||||
)
|
||||
async_remove_state_for_listener = async_call_later(hass, period, state_for_listener)
|
||||
|
||||
if entity_ids == MATCH_ALL:
|
||||
async_remove_state_for_cancel = hass.bus.async_listen(
|
||||
|
||||
Reference in New Issue
Block a user