Migrate shelly to use Debouncer.async_schedule_call (#111087)

This commit is contained in:
J. Nick Koston 2024-02-21 09:47:36 -06:00 committed by GitHub
parent 6e20cc8700
commit ae7ebc25c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -279,7 +279,7 @@ class ShellyBlockCoordinator(ShellyCoordinatorBase[BlockDevice]):
self.name,
ENTRY_RELOAD_COOLDOWN,
)
self.hass.async_create_task(self._debounced_reload.async_call())
self._debounced_reload.async_schedule_call()
self._last_cfg_changed = cfg_changed
async def _async_update_data(self) -> None:
@ -496,7 +496,7 @@ class ShellyRpcCoordinator(ShellyCoordinatorBase[RpcDevice]):
self.name,
ENTRY_RELOAD_COOLDOWN,
)
self.hass.async_create_task(self._debounced_reload.async_call())
self._debounced_reload.async_schedule_call()
elif event_type in RPC_INPUTS_EVENTS_TYPES:
for event_callback in self._input_event_listeners:
event_callback(event)