1 """Elmax integration common classes and utilities."""
3 from __future__
import annotations
5 from elmax_api.model.endpoint
import DeviceEndpoint
10 from .const
import DOMAIN
11 from .coordinator
import ElmaxCoordinator
15 """Wrapper for Elmax entities."""
19 elmax_device: DeviceEndpoint,
21 coordinator: ElmaxCoordinator,
23 """Construct the object."""
24 super().
__init__(coordinator=coordinator)
29 identifiers={(DOMAIN, coordinator.panel_entry.hash)},
30 name=coordinator.panel_entry.get_name_by_user(
31 coordinator.http_client.get_authenticated_username()
35 sw_version=panel_version,
40 """Return if entity is available."""
41 return super().available
and self.coordinator.panel_entry.online
None __init__(self, DeviceEndpoint elmax_device, str panel_version, ElmaxCoordinator coordinator)