diff --git a/homeassistant/components/ecoforest/manifest.json b/homeassistant/components/ecoforest/manifest.json index 518f4d97a04..2ef33b2054b 100644 --- a/homeassistant/components/ecoforest/manifest.json +++ b/homeassistant/components/ecoforest/manifest.json @@ -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"] } diff --git a/homeassistant/components/ecoforest/sensor.py b/homeassistant/components/ecoforest/sensor.py index 91f3138af37..e595ddb65f7 100644 --- a/homeassistant/components/ecoforest/sensor.py +++ b/homeassistant/components/ecoforest/sensor.py @@ -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, + ), ) diff --git a/homeassistant/components/ecoforest/strings.json b/homeassistant/components/ecoforest/strings.json index bd0605eab82..d1767be5cda 100644 --- a/homeassistant/components/ecoforest/strings.json +++ b/homeassistant/components/ecoforest/strings.json @@ -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": { diff --git a/requirements_all.txt b/requirements_all.txt index b6bf9982862..c89e0d28ee2 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -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 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 3531966afcd..2044802be27 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -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