mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 14:27:07 +00:00
Migrate Bluetooth coordinators to use Debouncer async_schedule_call (#111077)
* Switch Bluetooth to use Debouncer async_schedule_call If the debouncer does not fire the underlying call no task has to be scheduled * revert change in init * revert change in init * revert change in init
This commit is contained in:
parent
5267e4f5db
commit
e88dfd4f68
@ -168,7 +168,7 @@ class ActiveBluetoothDataUpdateCoordinator(
|
||||
# We use bluetooth events to trigger the poll so that we scan as soon as
|
||||
# possible after a device comes online or back in range, if a poll is due
|
||||
if self.needs_poll(service_info):
|
||||
self.hass.async_create_task(self._debounced_poll.async_call())
|
||||
self._debounced_poll.async_schedule_call()
|
||||
|
||||
@callback
|
||||
def _async_stop(self) -> None:
|
||||
|
@ -157,7 +157,7 @@ class ActiveBluetoothProcessorCoordinator(
|
||||
# We use bluetooth events to trigger the poll so that we scan as soon as
|
||||
# possible after a device comes online or back in range, if a poll is due
|
||||
if self.needs_poll(service_info):
|
||||
self.hass.async_create_task(self._debounced_poll.async_call())
|
||||
self._debounced_poll.async_schedule_call()
|
||||
|
||||
@callback
|
||||
def _async_stop(self) -> None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user