1 """Base Entity for Kaleidescape."""
3 from __future__
import annotations
6 from typing
import TYPE_CHECKING
12 from .const
import DOMAIN
as KALEIDESCAPE_DOMAIN, NAME
as KALEIDESCAPE_NAME
15 from kaleidescape
import Device
as KaleidescapeDevice
17 _LOGGER = logging.getLogger(__name__)
21 """Defines a base Kaleidescape entity."""
23 _attr_has_entity_name =
True
24 _attr_should_poll =
False
26 def __init__(self, device: KaleidescapeDevice) ->
None:
27 """Initialize entity."""
32 identifiers={(KALEIDESCAPE_DOMAIN, self.
_device_device.serial_number)},
35 name=f
"{KALEIDESCAPE_NAME} {device.system.friendly_name}",
36 model=self.
_device_device.system.type,
37 manufacturer=KALEIDESCAPE_NAME,
38 sw_version=f
"{self._device.system.kos_version}",
39 suggested_area=
"Theater",
40 configuration_url=f
"http://{self._device.host}",
44 """Register update listener."""
47 def _update(event: str) ->
None:
48 """Handle device state changes."""
None async_added_to_hass(self)
None __init__(self, KaleidescapeDevice device)
None async_write_ha_state(self)
None async_on_remove(self, CALLBACK_TYPE func)