1 """Component to embed Aqualink devices."""
3 from __future__
import annotations
5 from iaqualink.device
import AqualinkDevice
11 from .const
import DOMAIN
15 """Abstract class for all Aqualink platforms.
17 Entity state is updated via the interval timer within the integration.
18 Any entity state change via the iaqualink library triggers an internal
19 state refresh which is then propagated to all the entities in the system
20 via the refresh_system decorator above to the _update_callback in this
24 _attr_should_poll =
False
26 def __init__(self, dev: AqualinkDevice) ->
None:
27 """Initialize the entity."""
32 manufacturer=dev.manufacturer,
35 via_device=(DOMAIN, dev.system.serial),
39 """Set up a listener when this entity is added to HA."""
46 """Return whether the state is based on actual reading from the device."""
47 return self.
devdev.system.online
in [
False,
None]
51 """Return whether the device is available or not."""
52 return self.
devdev.system.online
is True
None async_added_to_hass(self)
None __init__(self, AqualinkDevice dev)
None async_write_ha_state(self)
None async_on_remove(self, CALLBACK_TYPE func)
Callable[[], None] async_dispatcher_connect(HomeAssistant hass, str signal, Callable[..., Any] target)