1 """The venstar component."""
3 from __future__
import annotations
10 from .const
import DOMAIN
11 from .coordinator
import VenstarDataUpdateCoordinator
15 """Representation of a Venstar entity."""
17 _attr_has_entity_name =
True
21 venstar_data_coordinator: VenstarDataUpdateCoordinator,
24 """Initialize the data object."""
25 super().
__init__(venstar_data_coordinator)
27 self.
_client_client = venstar_data_coordinator.client
31 """Handle updated data from the coordinator."""
32 self.async_write_ha_state()
36 """Return the device information for this entity."""
37 firmware_version = self.
_client_client.get_firmware_ver()
39 identifiers={(DOMAIN, self.
_config_config.entry_id)},
41 manufacturer=
"Venstar",
42 model=f
"{self._client.model}-{self._client.get_type()}",
43 sw_version=f
"{firmware_version[0]}.{firmware_version[1]}",
DeviceInfo device_info(self)
None __init__(self, VenstarDataUpdateCoordinator venstar_data_coordinator, ConfigEntry config)
None _handle_coordinator_update(self)