1 """Dormakaba dKey integration base entity."""
3 from __future__
import annotations
7 from py_dormakaba_dkey
import DKEYLock
8 from py_dormakaba_dkey.commands
import Notifications
15 DataUpdateCoordinator,
20 """Dormakaba dKey base entity."""
22 _attr_has_entity_name =
True
25 self, coordinator: DataUpdateCoordinator[
None], lock: DKEYLock
27 """Initialize a Dormakaba dKey entity."""
31 name=lock.device_info.device_name
or lock.device_info.device_id,
33 sw_version=lock.device_info.sw_version,
34 connections={(dr.CONNECTION_BLUETOOTH, lock.address)},
41 """Handle updating _attr values."""
45 """Handle data update."""
47 self.async_write_ha_state()
51 """Handle data update."""
55 """Register callbacks."""
None _async_update_attrs(self)
None __init__(self, DataUpdateCoordinator[None] coordinator, DKEYLock lock)
None _handle_coordinator_update(self)
None _handle_state_update(self, Notifications update)
None async_added_to_hass(self)
None async_set_updated_data(self, _DataT data)