1 """Base entity for the system bridge integration."""
7 from .const
import DOMAIN
8 from .coordinator
import SystemBridgeDataUpdateCoordinator
12 """Defines a base System Bridge entity."""
14 _attr_has_entity_name =
True
18 coordinator: SystemBridgeDataUpdateCoordinator,
22 """Initialize the System Bridge entity."""
25 self.
_hostname_hostname = coordinator.data.system.hostname
26 self.
_key_key = f
"{self._hostname}_{key}"
28 f
"http://{self._hostname}:{api_port}/app/settings.html"
30 self.
_mac_address_mac_address = coordinator.data.system.mac_address
31 self.
_uuid_uuid = coordinator.data.system.uuid
32 self.
_version_version = coordinator.data.system.version
36 """Return the unique ID for this entity."""
41 """Return device information about this System Bridge instance."""
44 connections={(dr.CONNECTION_NETWORK_MAC, self.
_mac_address_mac_address)},
45 identifiers={(DOMAIN, self.
_uuid_uuid)},
None __init__(self, SystemBridgeDataUpdateCoordinator coordinator, int api_port, str key)
DeviceInfo device_info(self)