mirror of
https://github.com/home-assistant/core.git
synced 2025-08-15 10:31:39 +02:00
Remove duplicated available property from Shelly coordinator entities (#96859)
remove duplicated available property
This commit is contained in:
@@ -210,7 +210,7 @@ class BlockSleepingClimate(
|
||||
"""Device availability."""
|
||||
if self.device_block is not None:
|
||||
return not cast(bool, self.device_block.valveError)
|
||||
return self.coordinator.last_update_success
|
||||
return super().available
|
||||
|
||||
@property
|
||||
def hvac_mode(self) -> HVACMode:
|
||||
|
@@ -332,11 +332,6 @@ class ShellyBlockEntity(CoordinatorEntity[ShellyBlockCoordinator]):
|
||||
)
|
||||
self._attr_unique_id = f"{coordinator.mac}-{block.description}"
|
||||
|
||||
@property
|
||||
def available(self) -> bool:
|
||||
"""Available."""
|
||||
return self.coordinator.last_update_success
|
||||
|
||||
async def async_added_to_hass(self) -> None:
|
||||
"""When entity is added to HASS."""
|
||||
self.async_on_remove(self.coordinator.async_add_listener(self._update_callback))
|
||||
@@ -375,11 +370,6 @@ class ShellyRpcEntity(CoordinatorEntity[ShellyRpcCoordinator]):
|
||||
self._attr_unique_id = f"{coordinator.mac}-{key}"
|
||||
self._attr_name = get_rpc_entity_name(coordinator.device, key)
|
||||
|
||||
@property
|
||||
def available(self) -> bool:
|
||||
"""Available."""
|
||||
return self.coordinator.last_update_success
|
||||
|
||||
@property
|
||||
def status(self) -> dict:
|
||||
"""Device status by entity key."""
|
||||
|
Reference in New Issue
Block a user