Files
core/homeassistant/components/melcloud/entity.py
T

20 lines
540 B
Python

"""Base entity for MELCloud integration."""
from typing import override
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .coordinator import MelCloudDeviceUpdateCoordinator
class MelCloudEntity(CoordinatorEntity[MelCloudDeviceUpdateCoordinator]):
"""Base class for MELCloud entities."""
_attr_has_entity_name = True
@property
@override
def available(self) -> bool:
"""Return True if entity is available."""
return super().available and self.coordinator.device_available