mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Small cleanups to the inkbird coordinator (#142911)
This commit is contained in:
parent
a6643d8fb3
commit
621326f4e4
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user