Correct SensorDeviceClass for sensirion_ble (#82413)

This commit is contained in:
Aarni Koskela 2022-11-20 16:27:36 +02:00 committed by GitHub
parent 372c3cd0f0
commit 76cb1c4978
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,19 +38,19 @@ SENSOR_DESCRIPTIONS: dict[
SSDSensorDeviceClass.CO2, SSDSensorDeviceClass.CO2,
Units.CONCENTRATION_PARTS_PER_MILLION, Units.CONCENTRATION_PARTS_PER_MILLION,
): SensorEntityDescription( ): SensorEntityDescription(
key=f"{SensorDeviceClass.CO2}_{Units.CONCENTRATION_PARTS_PER_MILLION}", key=f"{SSDSensorDeviceClass.CO2}_{Units.CONCENTRATION_PARTS_PER_MILLION}",
device_class=SensorDeviceClass.CO2, device_class=SensorDeviceClass.CO2,
native_unit_of_measurement=const.CONCENTRATION_PARTS_PER_MILLION, native_unit_of_measurement=const.CONCENTRATION_PARTS_PER_MILLION,
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
), ),
(SSDSensorDeviceClass.HUMIDITY, Units.PERCENTAGE): SensorEntityDescription( (SSDSensorDeviceClass.HUMIDITY, Units.PERCENTAGE): SensorEntityDescription(
key=f"{SensorDeviceClass.HUMIDITY}_{Units.PERCENTAGE}", key=f"{SSDSensorDeviceClass.HUMIDITY}_{Units.PERCENTAGE}",
device_class=SensorDeviceClass.HUMIDITY, device_class=SensorDeviceClass.HUMIDITY,
native_unit_of_measurement=const.PERCENTAGE, native_unit_of_measurement=const.PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
), ),
(SSDSensorDeviceClass.TEMPERATURE, Units.TEMP_CELSIUS): SensorEntityDescription( (SSDSensorDeviceClass.TEMPERATURE, Units.TEMP_CELSIUS): SensorEntityDescription(
key=f"{SensorDeviceClass.TEMPERATURE}_{Units.TEMP_CELSIUS}", key=f"{SSDSensorDeviceClass.TEMPERATURE}_{Units.TEMP_CELSIUS}",
device_class=SensorDeviceClass.TEMPERATURE, device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=const.TEMP_CELSIUS, native_unit_of_measurement=const.TEMP_CELSIUS,
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,