From 621326f4e4745a6175b9a8039c23bfe60c2d68df Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 13 Apr 2025 23:27:46 -1000 Subject: [PATCH] Small cleanups to the inkbird coordinator (#142911) --- homeassistant/components/inkbird/coordinator.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/inkbird/coordinator.py b/homeassistant/components/inkbird/coordinator.py index ed55bc79115..d52ebd83595 100644 --- a/homeassistant/components/inkbird/coordinator.py +++ b/homeassistant/components/inkbird/coordinator.py @@ -50,11 +50,6 @@ class INKBIRDActiveBluetoothProcessorCoordinator( self._device_data = device_data address = entry.unique_id assert address is not None - entry.async_on_unload( - async_track_time_interval( - hass, self._async_schedule_poll, FALLBACK_POLL_INTERVAL - ) - ) super().__init__( hass=hass, logger=_LOGGER, @@ -74,6 +69,11 @@ class INKBIRDActiveBluetoothProcessorCoordinator( self._async_device_data_changed, ) if not self._data.uses_notify: + self._entry.async_on_unload( + async_track_time_interval( + self.hass, self._async_schedule_poll, FALLBACK_POLL_INTERVAL + ) + ) return if not (service_info := async_last_service_info(self.hass, self.address)): raise ConfigEntryNotReady(