From 41462b89adb2536f87f3a7b70dbda64171c35b0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Dalfors?= Date: Thu, 12 Oct 2023 16:08:23 +0200 Subject: [PATCH] add sensors for time left for boost and fireplace modes --- README.md | 2 ++ custom_components/saleryd_hrv/manifest.json | 2 +- custom_components/saleryd_hrv/sensor.py | 22 +++++++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 177b834..ac59247 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,11 @@ Name | Description | Unit | -- | -- | -- +`boost_mode_minutes_left` | minutes left until boost mode expires | `min` `extract_fan_speed` | fan speed | `%` `supply_fan_speed` | fan speed | `%` `filter_months_left` | filter months left | `m` +`fireplace_mode_minutes_left` | minutes left until fireplace mode expires | `min` `heat_exchanger_rotor_speed` | rotor speed of heat exchanger | `rpm` `heat_exchanger_rotor_speed_percent` | rotor speed of heat exchanger | `%` `heater_air_temperature` | air temperature at heater | `°C` diff --git a/custom_components/saleryd_hrv/manifest.json b/custom_components/saleryd_hrv/manifest.json index 2a37461..d437dfa 100644 --- a/custom_components/saleryd_hrv/manifest.json +++ b/custom_components/saleryd_hrv/manifest.json @@ -12,5 +12,5 @@ "requirements": [ "pysaleryd>=3.0.6" ], - "version": "2.2.2" + "version": "2.2.3" } diff --git a/custom_components/saleryd_hrv/sensor.py b/custom_components/saleryd_hrv/sensor.py index 4cd297a..2ab2841 100644 --- a/custom_components/saleryd_hrv/sensor.py +++ b/custom_components/saleryd_hrv/sensor.py @@ -215,6 +215,28 @@ def extra_state_attributes(self) -> dict[str, Any] | None: native_unit_of_measurement=UnitOfTime.MONTHS, ), }, + "boost_mode_minutes_left": { + "klass": SalerydLokeSensor, + "description": SensorEntityDescription( + key="*FI", + icon="mdi:wrench-clock", + name="Boost mode minutes left", + state_class=SensorStateClass.MEASUREMENT, + device_class=SensorDeviceClass.DURATION, + native_unit_of_measurement=UnitOfTime.MINUTES, + ), + }, + "fireplace_mode_minutes_left": { + "klass": SalerydLokeSensor, + "description": SensorEntityDescription( + key="*ME", + icon="mdi:wrench-clock", + name="Fireplace mode minutes left", + state_class=SensorStateClass.MEASUREMENT, + device_class=SensorDeviceClass.DURATION, + native_unit_of_measurement=UnitOfTime.MINUTES, + ), + }, "control_system_name": { "klass": SalerydLokeSensor, "description": SensorEntityDescription(