mirror of
https://github.com/Andre0512/hon.git
synced 2025-05-13 06:34:22 -04:00
Merge branch 'main' into refactor
This commit is contained in:
commit
0d43eeff3d
35 changed files with 847 additions and 127 deletions
|
@ -9,7 +9,12 @@ from homeassistant.components.sensor import (
|
|||
SensorEntityDescription,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import PERCENTAGE
|
||||
from homeassistant.const import (
|
||||
PERCENTAGE,
|
||||
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
|
||||
CONCENTRATION_PARTS_PER_BILLION,
|
||||
CONCENTRATION_PARTS_PER_MILLION,
|
||||
)
|
||||
from homeassistant.const import (
|
||||
REVOLUTIONS_PER_MINUTE,
|
||||
UnitOfEnergy,
|
||||
|
@ -637,6 +642,7 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = {
|
|||
name="Temperature",
|
||||
icon="mdi:thermometer",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||
translation_key="temperature",
|
||||
),
|
||||
|
@ -673,6 +679,7 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = {
|
|||
icon="mdi:thermometer",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
translation_key="temperature",
|
||||
),
|
||||
HonSensorEntityDescription(
|
||||
|
@ -683,6 +690,76 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = {
|
|||
translation_key="programs_wc",
|
||||
),
|
||||
),
|
||||
"AP": (
|
||||
HonSensorEntityDescription(
|
||||
key="errors", name="Error", icon="mdi:math-log", translation_key="errors"
|
||||
),
|
||||
HonSensorEntityDescription(
|
||||
key="mainFilterStatus",
|
||||
name="Main Filter Status",
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
),
|
||||
HonSensorEntityDescription(
|
||||
key="preFilterStatus",
|
||||
name="Pre Filter Status",
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
),
|
||||
HonSensorEntityDescription(
|
||||
key="totalWorkTime",
|
||||
name="Total Work Time",
|
||||
native_unit_of_measurement=UnitOfTime.MINUTES,
|
||||
device_class=SensorDeviceClass.DURATION,
|
||||
),
|
||||
HonSensorEntityDescription(
|
||||
key="coLevel",
|
||||
name="CO Level",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
device_class=SensorDeviceClass.CO,
|
||||
native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION,
|
||||
),
|
||||
HonSensorEntityDescription(
|
||||
key="pm10ValueIndoor",
|
||||
name="pm10",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
device_class=SensorDeviceClass.PM10,
|
||||
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
|
||||
),
|
||||
HonSensorEntityDescription(
|
||||
key="pm2p5ValueIndoor",
|
||||
name="pm2p5",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
device_class=SensorDeviceClass.PM25,
|
||||
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
|
||||
),
|
||||
HonSensorEntityDescription(
|
||||
key="vocValueIndoor",
|
||||
name="VOC",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
device_class=SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS,
|
||||
native_unit_of_measurement=CONCENTRATION_PARTS_PER_BILLION,
|
||||
),
|
||||
HonSensorEntityDescription(
|
||||
key="humidityIndoor",
|
||||
name="Humidity",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
device_class=SensorDeviceClass.HUMIDITY,
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
translation_key="humidity",
|
||||
),
|
||||
HonSensorEntityDescription(
|
||||
key="temp",
|
||||
name="Temperature",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||
translation_key="temperature",
|
||||
),
|
||||
HonSensorEntityDescription(key="windSpeed", name="Wind Speed"),
|
||||
HonSensorEntityDescription(
|
||||
key="airQuality",
|
||||
name="Air Quality",
|
||||
),
|
||||
),
|
||||
}
|
||||
SENSORS["WD"] = unique_entities(SENSORS["WM"], SENSORS["TD"])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue