From 657f1772683c9738f3a32fb90474b50f4d208c17 Mon Sep 17 00:00:00 2001 From: Anko Hanse Date: Thu, 5 Sep 2024 19:45:56 +1200 Subject: [PATCH] Include improvements from aioxcom --- README.md | 3 +-- custom_components/studer_xcom/coordinator.py | 2 +- custom_components/studer_xcom/manifest.json | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3caa24f..2d22045 100644 --- a/README.md +++ b/README.md @@ -198,12 +198,11 @@ To reconfigure: When the value of a Studer param is changed via this integration (via a Number, Select or Switch entity), these are written via Xcom to the affected device. Changes are stored in the device's RAM memory, not in its flash memory as you can only write to flash a limited number of time over its lifetime. -However, reading back the value from the entity will be from flash (querying RAM gives unreliable responses). As a result, the change to the entity value is not visible. You can only tell from the behavior of the PV system that the Studer param was indeed changed. +However, reading back the value from the entity will be from flash. As a result, the change to the entity value is not visible. You can only tell from the behavior of the PV system that the Studer param was indeed changed. After a restart/reboot of the PV system the system will revert to the value from Flash. So you may want to periodically repeat the write of changed param values via an automation. **IMPORTANT**: -I will not take responsibility for damage to your PV system resulting from you choosing to change Studer params you are not supposed to change. Or setting a combination of param values that cause an invalid status. Be very carefull in changing params marked as having level Expert, Installer or even Qualified Service Person. If you do not know what the effect of a Studer param change is, then do not change it. diff --git a/custom_components/studer_xcom/coordinator.py b/custom_components/studer_xcom/coordinator.py index 4bdd264..0a18277 100644 --- a/custom_components/studer_xcom/coordinator.py +++ b/custom_components/studer_xcom/coordinator.py @@ -341,7 +341,7 @@ async def _async_request_all_data(self): async def async_request_test(self, param, addr): try: value = await self._api.requestValue(param, addr) - if value: + if value is not None: return True except Exception as e: diff --git a/custom_components/studer_xcom/manifest.json b/custom_components/studer_xcom/manifest.json index 68b2908..92a3098 100644 --- a/custom_components/studer_xcom/manifest.json +++ b/custom_components/studer_xcom/manifest.json @@ -9,6 +9,6 @@ "iot_class": "local_polling", "issue_tracker": "https://github.com/ankohanse/hass-studer-xcom/issues", "loggers": ["custom_components.studer_xcom"], - "requirements": ["aioxcom>=1.0.1"], - "version": "2024.09.1" + "requirements": ["aioxcom>=1.0.2"], + "version": "2024.09.2" } \ No newline at end of file