Skip to content
This repository has been archived by the owner on Apr 8, 2023. It is now read-only.

Commit

Permalink
v0.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
sdesalve authored Sep 22, 2021
1 parent 856a7d8 commit 6e48955
Showing 1 changed file with 1 addition and 64 deletions.
65 changes: 1 addition & 64 deletions custom_components/zcsazzurro/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
{
Expand Down Expand Up @@ -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."""
Expand Down

0 comments on commit 6e48955

Please sign in to comment.