From 6e48955f95bb3feb6f4942ddc192ecb146b0a2f8 Mon Sep 17 00:00:00 2001 From: sdesalve Date: Wed, 22 Sep 2021 10:23:54 +0200 Subject: [PATCH] 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."""