Move available property in BasePassiveBluetoothCoordinator to PassiveBluetoothDataUpdateCoordinator (#117056)
This commit is contained in:
parent
04c0b7d3df
commit
19c26b79af
3 changed files with 6 additions and 6 deletions
|
@ -48,6 +48,11 @@ class PassiveBluetoothDataUpdateCoordinator(
|
|||
super().__init__(hass, logger, address, mode, connectable)
|
||||
self._listeners: dict[CALLBACK_TYPE, tuple[CALLBACK_TYPE, object | None]] = {}
|
||||
|
||||
@property
|
||||
def available(self) -> bool:
|
||||
"""Return if device is available."""
|
||||
return self._available
|
||||
|
||||
@callback
|
||||
def async_update_listeners(self) -> None:
|
||||
"""Update all registered listeners."""
|
||||
|
|
|
@ -311,7 +311,7 @@ class PassiveBluetoothProcessorCoordinator(
|
|||
@property
|
||||
def available(self) -> bool:
|
||||
"""Return if the device is available."""
|
||||
return super().available and self.last_update_success
|
||||
return self._available and self.last_update_success
|
||||
|
||||
@callback
|
||||
def async_get_restore_data(
|
||||
|
|
|
@ -83,11 +83,6 @@ class BasePassiveBluetoothCoordinator(ABC):
|
|||
# was set when the unavailable callback was called.
|
||||
return self._last_unavailable_time
|
||||
|
||||
@property
|
||||
def available(self) -> bool:
|
||||
"""Return if the device is available."""
|
||||
return self._available
|
||||
|
||||
@callback
|
||||
def _async_start(self) -> None:
|
||||
"""Start the callbacks."""
|
||||
|
|
Loading…
Add table
Reference in a new issue