mirror of
https://github.com/home-assistant/core.git
synced 2025-06-25 01:21:51 +02:00
Add additional sensors to ecoforest integration (#102734)
This commit is contained in:
@ -5,5 +5,5 @@
|
||||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/ecoforest",
|
||||
"iot_class": "local_polling",
|
||||
"requirements": ["pyecoforest==0.3.0"]
|
||||
"requirements": ["pyecoforest==0.4.0"]
|
||||
}
|
||||
|
@ -13,7 +13,12 @@ from homeassistant.components.sensor import (
|
||||
SensorEntityDescription,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import UnitOfTemperature
|
||||
from homeassistant.const import (
|
||||
PERCENTAGE,
|
||||
UnitOfPressure,
|
||||
UnitOfTemperature,
|
||||
UnitOfTime,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.typing import StateType
|
||||
@ -88,6 +93,59 @@ SENSOR_TYPES: tuple[EcoforestSensorEntityDescription, ...] = (
|
||||
icon="mdi:alert",
|
||||
value_fn=lambda data: data.alarm.value if data.alarm else "none",
|
||||
),
|
||||
EcoforestSensorEntityDescription(
|
||||
key="depression",
|
||||
translation_key="depression",
|
||||
native_unit_of_measurement=UnitOfPressure.PA,
|
||||
device_class=SensorDeviceClass.ATMOSPHERIC_PRESSURE,
|
||||
entity_registry_enabled_default=False,
|
||||
value_fn=lambda data: data.depression,
|
||||
),
|
||||
EcoforestSensorEntityDescription(
|
||||
key="working_hours",
|
||||
translation_key="working_hours",
|
||||
native_unit_of_measurement=UnitOfTime.HOURS,
|
||||
device_class=SensorDeviceClass.DURATION,
|
||||
entity_registry_enabled_default=False,
|
||||
value_fn=lambda data: data.working_hours,
|
||||
),
|
||||
EcoforestSensorEntityDescription(
|
||||
key="ignitions",
|
||||
translation_key="ignitions",
|
||||
native_unit_of_measurement="ignitions",
|
||||
entity_registry_enabled_default=False,
|
||||
value_fn=lambda data: data.ignitions,
|
||||
),
|
||||
EcoforestSensorEntityDescription(
|
||||
key="live_pulse",
|
||||
translation_key="live_pulse",
|
||||
native_unit_of_measurement=UnitOfTime.SECONDS,
|
||||
device_class=SensorDeviceClass.DURATION,
|
||||
entity_registry_enabled_default=False,
|
||||
value_fn=lambda data: data.live_pulse,
|
||||
),
|
||||
EcoforestSensorEntityDescription(
|
||||
key="pulse_offset",
|
||||
translation_key="pulse_offset",
|
||||
native_unit_of_measurement=UnitOfTime.SECONDS,
|
||||
device_class=SensorDeviceClass.DURATION,
|
||||
entity_registry_enabled_default=False,
|
||||
value_fn=lambda data: data.pulse_offset,
|
||||
),
|
||||
EcoforestSensorEntityDescription(
|
||||
key="extractor",
|
||||
translation_key="extractor",
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
entity_registry_enabled_default=False,
|
||||
value_fn=lambda data: data.extractor,
|
||||
),
|
||||
EcoforestSensorEntityDescription(
|
||||
key="convecto_air_flow",
|
||||
translation_key="convecto_air_flow",
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
entity_registry_enabled_default=False,
|
||||
value_fn=lambda data: data.convecto_air_flow,
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
|
@ -50,6 +50,33 @@
|
||||
"unkownn": "Unknown alarm",
|
||||
"none": "None"
|
||||
}
|
||||
},
|
||||
"depression": {
|
||||
"name": "Depression"
|
||||
},
|
||||
"working_hours": {
|
||||
"name": "Working time"
|
||||
},
|
||||
"working_state": {
|
||||
"name": "Working state"
|
||||
},
|
||||
"working_level": {
|
||||
"name": "Working level"
|
||||
},
|
||||
"ignitions": {
|
||||
"name": "Ignitions"
|
||||
},
|
||||
"live_pulse": {
|
||||
"name": "Live pulse"
|
||||
},
|
||||
"pulse_offset": {
|
||||
"name": "Pulse offset"
|
||||
},
|
||||
"extractor": {
|
||||
"name": "Extractor"
|
||||
},
|
||||
"convecto_air_flow": {
|
||||
"name": "Convecto air flow"
|
||||
}
|
||||
},
|
||||
"number": {
|
||||
|
@ -1681,7 +1681,7 @@ pydroid-ipcam==2.0.0
|
||||
pyebox==1.1.4
|
||||
|
||||
# homeassistant.components.ecoforest
|
||||
pyecoforest==0.3.0
|
||||
pyecoforest==0.4.0
|
||||
|
||||
# homeassistant.components.econet
|
||||
pyeconet==0.1.22
|
||||
|
@ -1266,7 +1266,7 @@ pydrawise==2023.10.0
|
||||
pydroid-ipcam==2.0.0
|
||||
|
||||
# homeassistant.components.ecoforest
|
||||
pyecoforest==0.3.0
|
||||
pyecoforest==0.4.0
|
||||
|
||||
# homeassistant.components.econet
|
||||
pyeconet==0.1.22
|
||||
|
Reference in New Issue
Block a user