Add CO2 and efficiency sensors to Vallox (#48923)
* Add Vallox efficiency sensor * Add Vallox CO2 sensor * Use the CO2 device class for the Vallox CO2 sensor
This commit is contained in:
parent
d12110556f
commit
bf0b19b05e
1 changed files with 18 additions and 0 deletions
|
@ -5,6 +5,8 @@ import logging
|
|||
|
||||
from homeassistant.components.sensor import SensorEntity
|
||||
from homeassistant.const import (
|
||||
CONCENTRATION_PARTS_PER_MILLION,
|
||||
DEVICE_CLASS_CO2,
|
||||
DEVICE_CLASS_HUMIDITY,
|
||||
DEVICE_CLASS_TEMPERATURE,
|
||||
DEVICE_CLASS_TIMESTAMP,
|
||||
|
@ -91,6 +93,22 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
|
|||
unit_of_measurement=None,
|
||||
icon="mdi:filter",
|
||||
),
|
||||
ValloxSensor(
|
||||
name=f"{name} Efficiency",
|
||||
state_proxy=state_proxy,
|
||||
metric_key="A_CYC_EXTRACT_EFFICIENCY",
|
||||
device_class=None,
|
||||
unit_of_measurement=PERCENTAGE,
|
||||
icon="mdi:gauge",
|
||||
),
|
||||
ValloxSensor(
|
||||
name=f"{name} CO2",
|
||||
state_proxy=state_proxy,
|
||||
metric_key="A_CYC_CO2_VALUE",
|
||||
device_class=DEVICE_CLASS_CO2,
|
||||
unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION,
|
||||
icon=None,
|
||||
),
|
||||
]
|
||||
|
||||
async_add_entities(sensors, update_before_add=False)
|
||||
|
|
Loading…
Add table
Reference in a new issue