ha-zcsazzurro icon indicating copy to clipboard operation
ha-zcsazzurro copied to clipboard

Autoconsumed Power should acknowledge Battery consumption

Open Azokul opened this issue 1 year ago • 2 comments

Feature request

Hi, So, after a little bit of testing and tweaking I found out that AutoConsumed power doesn't really take into consideration the energy provided by the battery.

If possible it would be awesome to be able to have a separate sensor that take in consideration the usage of the battery or having it implemented directly on the AutoconsumedPower.

What version of the integration are you using?

0.0.8

Anything in the logs that might be useful for us?

No response

Additional information

No response

Azokul avatar Jun 26 '23 21:06 Azokul

Hi @Azokul, this integration is reporting the data taken from ZCS API as-is. This is an example of data retrieved from their API:

{
    "xxxxxxxxx": {
        "energyAutoconsuming": 0.13,
        "energyAutoconsumingTotal": 341.2,
        "lastUpdate": "2023-06-29T06:16:00Z",
        "energyDischarging": 2.2,
        "powerDischarging": 0,
        "powerImporting": 560,
        "energyChargingTotal": 147.1,
        "batterySoC": 29,
        "powerGenerating": 266,
        "energyGeneratingTotal": 2106.7,
        "powerConsuming": 826,
        "energyExportingTotal": 1618.4,
        "energyImportingTotal": 274.7,
        "energyConsuming": 6.21,
        "powerExporting": 0,
        "batteryCycletime": 10,
        "thingFind": "2022-01-09T12:01:32Z",
        "energyDischargingTotal": 106.9,
        "energyCharging": 0.0,
        "powerCharging": 0,
        "energyConsumingTotal": 722.8,
        "powerAutoconsuming": 266,
        "energyGenerating": 0.15,
        "energyExporting": 0.02,
        "energyImporting": 3.88
    }
}

If this is information you need can be expressed as an arithmetic operation between the data from their API, then it is possible to show it into the HA integration. Otherwise, it is necessary to keep the state into HA, but then it becomes difficult to handle (also due to the fact that a reboot might loose data etc.).

Thank you Andrea

aturri avatar Jun 29 '23 06:06 aturri

Ah i see, thanks! I think i might be able to derive it then ^_^

Azokul avatar Jun 29 '23 08:06 Azokul