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
|
self._device_data = device_data
|
||||||
address = entry.unique_id
|
address = entry.unique_id
|
||||||
assert address is not None
|
assert address is not None
|
||||||
entry.async_on_unload(
|
|
||||||
async_track_time_interval(
|
|
||||||
hass, self._async_schedule_poll, FALLBACK_POLL_INTERVAL
|
|
||||||
)
|
|
||||||
)
|
|
||||||
super().__init__(
|
super().__init__(
|
||||||
hass=hass,
|
hass=hass,
|
||||||
logger=_LOGGER,
|
logger=_LOGGER,
|
||||||
@ -74,6 +69,11 @@ class INKBIRDActiveBluetoothProcessorCoordinator(
|
|||||||
self._async_device_data_changed,
|
self._async_device_data_changed,
|
||||||
)
|
)
|
||||||
if not self._data.uses_notify:
|
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
|
return
|
||||||
if not (service_info := async_last_service_info(self.hass, self.address)):
|
if not (service_info := async_last_service_info(self.hass, self.address)):
|
||||||
raise ConfigEntryNotReady(
|
raise ConfigEntryNotReady(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user