From 7fce629fc48fd52cba2d9e6b5c18795abbe3aca6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Machulda?= Date: Mon, 11 Mar 2024 17:01:19 +0100 Subject: [PATCH] Change airthings pressure sensor device_class to atmospheric pressure (#113005) --- homeassistant/components/airthings/sensor.py | 2 +- homeassistant/components/airthings_ble/sensor.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/airthings/sensor.py b/homeassistant/components/airthings/sensor.py index 6787326be8c..fc91d816aca 100644 --- a/homeassistant/components/airthings/sensor.py +++ b/homeassistant/components/airthings/sensor.py @@ -48,7 +48,7 @@ SENSORS: dict[str, SensorEntityDescription] = { ), "pressure": SensorEntityDescription( key="pressure", - device_class=SensorDeviceClass.PRESSURE, + device_class=SensorDeviceClass.ATMOSPHERIC_PRESSURE, native_unit_of_measurement=UnitOfPressure.MBAR, ), "battery": SensorEntityDescription( diff --git a/homeassistant/components/airthings_ble/sensor.py b/homeassistant/components/airthings_ble/sensor.py index 941ea1d6b45..e281d81827c 100644 --- a/homeassistant/components/airthings_ble/sensor.py +++ b/homeassistant/components/airthings_ble/sensor.py @@ -82,7 +82,7 @@ SENSORS_MAPPING_TEMPLATE: dict[str, SensorEntityDescription] = { ), "pressure": SensorEntityDescription( key="pressure", - device_class=SensorDeviceClass.PRESSURE, + device_class=SensorDeviceClass.ATMOSPHERIC_PRESSURE, native_unit_of_measurement=UnitOfPressure.MBAR, state_class=SensorStateClass.MEASUREMENT, ),