From 31bb5ed283f9e4d46b12e99dbd4ff38117095ca2 Mon Sep 17 00:00:00 2001 From: skurz Date: Thu, 31 Oct 2024 13:11:38 +0100 Subject: [PATCH] add min firmware version for current power consumption sensor --- custom_components/luxtronik/sensor.py | 2 +- custom_components/luxtronik/sensor_entities_predefined.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/luxtronik/sensor.py b/custom_components/luxtronik/sensor.py index ab7b8da..335136c 100644 --- a/custom_components/luxtronik/sensor.py +++ b/custom_components/luxtronik/sensor.py @@ -459,7 +459,7 @@ def _restore_attr_value(self, value: Any | None) -> Any: if day == name: vals.append(idx) break - if len(vals): + if vals: return vals return time.min diff --git a/custom_components/luxtronik/sensor_entities_predefined.py b/custom_components/luxtronik/sensor_entities_predefined.py index a00300e..9b61067 100644 --- a/custom_components/luxtronik/sensor_entities_predefined.py +++ b/custom_components/luxtronik/sensor_entities_predefined.py @@ -468,6 +468,7 @@ native_unit_of_measurement=UnitOfPower.WATT, entity_registry_enabled_default=False, native_precision=0, + min_firmware_version_minor=FirmwareVersionMinor.minor_88, ), # endregion Main heatpump # region Heating