1 """Home Connect entity base class."""
10 from .api
import HomeConnectDevice
11 from .const
import DOMAIN, SIGNAL_UPDATE_ENTITIES
13 _LOGGER = logging.getLogger(__name__)
17 """Generic Home Connect entity (base class)."""
19 _attr_should_poll =
False
20 _attr_has_entity_name =
True
22 def __init__(self, device: HomeConnectDevice, desc: EntityDescription) ->
None:
23 """Initialize the entity."""
28 identifiers={(DOMAIN, device.appliance.haId)},
29 manufacturer=device.appliance.brand,
30 model=device.appliance.vib,
31 name=device.appliance.name,
35 """Register callbacks."""
45 if ha_id == self.
devicedevice.appliance.haId:
50 """Update the entity."""
51 _LOGGER.debug(
"Entity update triggered on %s", self)
56 """Return the BSH key."""
None async_added_to_hass(self)
None async_entity_update(self)
None _update_callback(self, str ha_id)
None __init__(self, HomeConnectDevice device, EntityDescription desc)
None async_schedule_update_ha_state(self, bool force_refresh=False)
None async_on_remove(self, CALLBACK_TYPE func)
Callable[[], None] async_dispatcher_connect(HomeAssistant hass, str signal, Callable[..., Any] target)