mirror of
https://github.com/home-assistant/core.git
synced 2026-01-25 00:52:39 +01:00
Co-authored-by: divers33 <divers33@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Joostlek <joostlek@outlook.com>
19 lines
533 B
Python
19 lines
533 B
Python
"""Base entity for MELCloud integration."""
|
|
|
|
from __future__ import annotations
|
|
|
|
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
|
|
def available(self) -> bool:
|
|
"""Return True if entity is available."""
|
|
return super().available and self.coordinator.device_available
|