From b84ca80d557ca17d458ede6ba18f1ff56701cf8e Mon Sep 17 00:00:00 2001 From: Ray Xue <32085550+xuejuhui@users.noreply.github.com> Date: Sun, 22 Mar 2026 18:21:28 -0500 Subject: [PATCH] Add Linptech PS1BB pressure sensor support to xiaomi_ble (#166095) --- homeassistant/components/xiaomi_ble/sensor.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/homeassistant/components/xiaomi_ble/sensor.py b/homeassistant/components/xiaomi_ble/sensor.py index 0fcae1925bb7..3b2fcddc1971 100644 --- a/homeassistant/components/xiaomi_ble/sensor.py +++ b/homeassistant/components/xiaomi_ble/sensor.py @@ -177,6 +177,24 @@ SENSOR_DESCRIPTIONS = { native_unit_of_measurement=UnitOfTime.MINUTES, state_class=SensorStateClass.MEASUREMENT, ), + # Pressure present duration (in seconds) for Pressure Sensor + ( + ExtendedSensorDeviceClass.PRESSURE_PRESENT_DURATION, + Units.TIME_SECONDS, + ): SensorEntityDescription( + key=str(ExtendedSensorDeviceClass.PRESSURE_PRESENT_DURATION), + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + ), + # Pressure not present duration (in seconds) for Pressure Sensor + ( + ExtendedSensorDeviceClass.PRESSURE_NOT_PRESENT_DURATION, + Units.TIME_SECONDS, + ): SensorEntityDescription( + key=str(ExtendedSensorDeviceClass.PRESSURE_NOT_PRESENT_DURATION), + native_unit_of_measurement=UnitOfTime.SECONDS, + state_class=SensorStateClass.MEASUREMENT, + ), # Low frequency impedance sensor (ohm) (ExtendedSensorDeviceClass.IMPEDANCE_LOW, Units.OHM): SensorEntityDescription( key=str(ExtendedSensorDeviceClass.IMPEDANCE_LOW),