From 856a7d82ff0e41e191f12d13758cf5322c7fff75 Mon Sep 17 00:00:00 2001 From: sdesalve Date: Wed, 22 Sep 2021 10:21:01 +0200 Subject: [PATCH 1/2] 0.0.6 --- custom_components/zcsazzurro/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/zcsazzurro/manifest.json b/custom_components/zcsazzurro/manifest.json index 54cec4c..1d63730 100644 --- a/custom_components/zcsazzurro/manifest.json +++ b/custom_components/zcsazzurro/manifest.json @@ -6,5 +6,5 @@ "after_dependencies": ["rest"], "codeowners": ["@sdesalve"], "iot_class": "cloud_polling", - "version": "0.0.4" + "version": "0.0.6" } From 6e48955f95bb3feb6f4942ddc192ecb146b0a2f8 Mon Sep 17 00:00:00 2001 From: sdesalve Date: Wed, 22 Sep 2021 10:23:54 +0200 Subject: [PATCH 2/2] v0.0.6 --- custom_components/zcsazzurro/sensor.py | 65 +------------------------- 1 file changed, 1 insertion(+), 64 deletions(-) diff --git a/custom_components/zcsazzurro/sensor.py b/custom_components/zcsazzurro/sensor.py index 45c9303..156021b 100644 --- a/custom_components/zcsazzurro/sensor.py +++ b/custom_components/zcsazzurro/sensor.py @@ -34,7 +34,7 @@ DEFAULT_NAME = "ZCSAzzurro" DEFAULT_VERIFY_SSL = False -SCAN_INTERVAL = timedelta(minutes=1) +SCAN_INTERVAL = timedelta(minutes=4) PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( { @@ -315,69 +315,6 @@ def extra_state_attributes(self): } except TypeError: _LOGGER.error("Error cannot find all required keys: %s", self.dssoutput) - return { - "lastUpdated": False, - "thing.find": False, - "total": { - "energyGenerating": -1, - "energyCharging": -1, - "energyDischarging": -1, - "energyExporting": -1, - "energyImporting": -1, - "energyConsuming": -1, - "energyAutoconsuming": -1 - }, - "current": { - "energyGenerating": -1, - "powerGenerating": -1, - "batteryCycletime": -1, - "batterySoC": -1, - "powerCharging": -1, - "powerDischarging": -1, - "powerExporting": -1, - "powerImporting": -1, - "powerConsuming": -1, - "powerAutoconsuming": -1, - "energyCharging": -1, - "energyDischarging": -1, - "energyExporting": -1, - "energyImporting": -1, - "energyConsuming": -1, - "energyAutoconsuming": -1, - }, - } - else: - return { - "lastUpdated": False, - "thing.find": False, - "total": { - "energyGenerating": -1, - "energyCharging": -1, - "energyDischarging": -1, - "energyExporting": -1, - "energyImporting": -1, - "energyConsuming": -1, - "energyAutoconsuming": -1 - }, - "current": { - "energyGenerating": -1, - "powerGenerating": -1, - "batteryCycletime": -1, - "batterySoC": -1, - "powerCharging": -1, - "powerDischarging": -1, - "powerExporting": -1, - "powerImporting": -1, - "powerConsuming": -1, - "powerAutoconsuming": -1, - "energyCharging": -1, - "energyDischarging": -1, - "energyExporting": -1, - "energyImporting": -1, - "energyConsuming": -1, - "energyAutoconsuming": -1, - }, - } async def async_update(self): """Get the latest data from the ZCSAzzurro API and updates the state."""