Reduce Bluetooth coordinator/processor overhead (#99526)

This commit is contained in:
J. Nick Koston 2023-09-03 08:59:15 -05:00 committed by GitHub
parent 9bba501057
commit 8843a445c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 3 deletions

View file

@ -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(

View file

@ -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(

View file

@ -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