1 """Common opentherm_gw entity properties."""
5 import pyotgw.vars
as gw_vars
12 from .
import OpenThermGatewayHub
13 from .const
import DOMAIN, OpenThermDataSource, OpenThermDeviceDescription
15 _LOGGER = logging.getLogger(__name__)
18 gw_vars.BOILER:
"Boiler",
20 gw_vars.THERMOSTAT:
"Thermostat",
25 """Describe common opentherm_gw entity properties."""
27 device_description: OpenThermDeviceDescription
31 """Represent an OpenTherm entity."""
33 _attr_has_entity_name =
True
34 _attr_should_poll =
False
35 entity_description: OpenThermEntityDescription
39 gw_hub: OpenThermGatewayHub,
40 description: OpenThermEntityDescription,
42 """Initialize the entity."""
45 self.
_attr_unique_id_attr_unique_id = f
"{gw_hub.hub_id}-{description.device_description.device_identifier}-{description.key}"
50 f
"{gw_hub.hub_id}-{description.device_description.device_identifier}",
57 """Return connection status of the hub to indicate availability."""
58 return self.
_gateway_gateway.connected
62 """Represent an OpenTherm entity that receives status updates."""
65 """Subscribe to updates from the component."""
74 """Handle status updates from the component."""
76 raise NotImplementedError
None __init__(self, OpenThermGatewayHub gw_hub, OpenThermEntityDescription description)
None async_added_to_hass(self)
None receive_report(self, dict[OpenThermDataSource, dict] status)
None async_on_remove(self, CALLBACK_TYPE func)
Callable[[], None] async_dispatcher_connect(HomeAssistant hass, str signal, Callable[..., Any] target)