sensor.py
Distance sensor for the HA=1 OpenAliro direct integration.
Overview
Distance sensor for the HA=1 OpenAliro direct integration.
depends on const.py runtime.py
API
Fasync_setup_entry(hass: HomeAssistant, entry: ConfigEntry[OpenAliroRuntime], async_add_entities: AddEntitiesCallback) -> None
Create the one supported distance entity.
OpenAliroDistanceSensorCclass OpenAliroDistanceSensor(SensorEntity)
Latest valid UWB range, without peer or credential metadata.
async_setup_entryFOpenAliroDistanceSensor.__init__(self, runtime: OpenAliroRuntime) -> None
Initialize the distance sensor entity with the runtime reference and a unique ID derived from the device ID.
FOpenAliroDistanceSensor.available(self) -> bool
Return whether the distance sensor is currently receiving valid range measurements from the lock.
FOpenAliroDistanceSensor.native_value(self) -> int | None
Return the most recent measured distance to the lock in millimeters, or None if no measurement is available.
FOpenAliroDistanceSensor.device_info(self) -> DeviceInfo
Return Home Assistant device metadata: a unique identifier derived from the lock's device ID and the openaliro manufacturer name.
FOpenAliroDistanceSensor.async_added_to_hass(self) -> None
Register a listener callback that syncs the sensor state to Home Assistant when the runtime changes.
FOpenAliroDistanceSensor.async_will_remove_from_hass(self) -> None
Unregister the listener callback on entity removal.
Undocumented (1)
OpenAliroDistanceSensor.update