1 """Support for the Hive devices and services."""
3 from __future__
import annotations
7 from apyhiveapi
import Hive
13 from .const
import DOMAIN
17 """Initiate Hive Base Class."""
19 def __init__(self, hive: Hive, hive_device: dict[str, Any]) ->
None:
20 """Initialize the instance."""
24 self.
_attr_unique_id_attr_unique_id = f
'{self.device["hiveID"]}-{self.device["hiveType"]}'
26 identifiers={(DOMAIN, self.
devicedevice[
"device_id"])},
27 model=self.
devicedevice[
"deviceData"][
"model"],
28 manufacturer=self.
devicedevice[
"deviceData"][
"manufacturer"],
29 name=self.
devicedevice[
"device_name"],
30 sw_version=self.
devicedevice[
"deviceData"][
"version"],
31 via_device=(DOMAIN, self.
devicedevice[
"parentDevice"]),
33 self.attributes: dict[str, Any] = {}
36 """When entity is added to Home Assistant."""
None __init__(self, Hive hive, dict[str, Any] hive_device)
None async_added_to_hass(self)
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)