mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
Reduce Bluetooth coordinator/processor overhead (#99526)
This commit is contained in:
parent
9bba501057
commit
8843a445c9
@ -110,7 +110,7 @@ class ActiveBluetoothDataUpdateCoordinator(
|
||||
return False
|
||||
poll_age: float | None = None
|
||||
if self._last_poll:
|
||||
poll_age = monotonic_time_coarse() - self._last_poll
|
||||
poll_age = service_info.time - self._last_poll
|
||||
return self._needs_poll_method(service_info, poll_age)
|
||||
|
||||
async def _async_poll_data(
|
||||
|
@ -103,7 +103,7 @@ class ActiveBluetoothProcessorCoordinator(
|
||||
return False
|
||||
poll_age: float | None = None
|
||||
if self._last_poll:
|
||||
poll_age = monotonic_time_coarse() - self._last_poll
|
||||
poll_age = service_info.time - self._last_poll
|
||||
return self._needs_poll_method(service_info, poll_age)
|
||||
|
||||
async def _async_poll_data(
|
||||
|
@ -341,7 +341,6 @@ class PassiveBluetoothProcessorCoordinator(
|
||||
change: BluetoothChange,
|
||||
) -> None:
|
||||
"""Handle a Bluetooth event."""
|
||||
super()._async_handle_bluetooth_event(service_info, change)
|
||||
if self.hass.is_stopping:
|
||||
return
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user