Reduce Bluetooth coordinator/processor overhead (#99526)
This commit is contained in:
parent
9bba501057
commit
8843a445c9
3 changed files with 2 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue