Add dew point to Awair integration (#148403)

This commit is contained in:
Rico Hageman 2025-07-09 09:28:55 +02:00 committed by GitHub
parent afcd991262
commit a02359b25d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 14 additions and 0 deletions

View File

@ -6,6 +6,7 @@ from datetime import timedelta
import logging import logging
API_CO2 = "carbon_dioxide" API_CO2 = "carbon_dioxide"
API_DEW_POINT = "dew_point"
API_DUST = "dust" API_DUST = "dust"
API_HUMID = "humidity" API_HUMID = "humidity"
API_LUX = "illuminance" API_LUX = "illuminance"

View File

@ -34,6 +34,7 @@ from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .const import ( from .const import (
API_CO2, API_CO2,
API_DEW_POINT,
API_DUST, API_DUST,
API_HUMID, API_HUMID,
API_LUX, API_LUX,
@ -110,6 +111,15 @@ SENSOR_TYPES: tuple[AwairSensorEntityDescription, ...] = (
unique_id_tag="CO2", # matches legacy format unique_id_tag="CO2", # matches legacy format
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
), ),
AwairSensorEntityDescription(
key=API_DEW_POINT,
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
translation_key="dew_point",
unique_id_tag="dew_point",
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
),
) )
SENSOR_TYPES_DUST: tuple[AwairSensorEntityDescription, ...] = ( SENSOR_TYPES_DUST: tuple[AwairSensorEntityDescription, ...] = (

View File

@ -57,6 +57,9 @@
}, },
"sound_level": { "sound_level": {
"name": "Sound level" "name": "Sound level"
},
"dew_point": {
"name": "Dew point"
} }
} }
} }