mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 07:07:28 +00:00
Add dew point to Awair integration (#148403)
This commit is contained in:
parent
afcd991262
commit
a02359b25d
@ -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"
|
||||||
|
@ -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, ...] = (
|
||||||
|
@ -57,6 +57,9 @@
|
|||||||
},
|
},
|
||||||
"sound_level": {
|
"sound_level": {
|
||||||
"name": "Sound level"
|
"name": "Sound level"
|
||||||
|
},
|
||||||
|
"dew_point": {
|
||||||
|
"name": "Dew point"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user