tolwi / hassio-ecoflow-cloud

EcoFlow Cloud Integration for Home Assistant
281 stars 47 forks source link

Reset PowerStream Inverter Output Watts when Status is Offline and Inverter Relay Status = 16 #220

Open Gothbass opened 3 months ago

Gothbass commented 3 months ago

Hello, I'm calculating the Energy in Wh delivered by PowerStream. To do that I use "Integration - Riemann sum integral" :

image

It's working well, I have just an issue when the PowerStream doesn't deliver power, It keeps the latest value on the variable "Inverter Output Watts" and when the PowerStream restarts to deliver power, I have a jump on the calculation of the integral. So, is it possible to set "Inverter Output Watts" to 0 when "Status" is Offline and "Inverter Relay Status" = 16 ?

image

image

belowzero218 commented 3 months ago

Got the same issue. This messes up the whole statistics.

Extreme example from October. Look at the Smartplug load for one day

IMG_5469

foxthefox commented 3 months ago

Powerstream provides already daily values for solar, from/to battery etc. So if this would be integrated, then the integral calc could be avoided

TheLastFrame commented 1 month ago

I built a template sensor to represent the real values of the powerstream and then created an energy sensor with powercalc for it.

But you're right, it would be nice if the integration could handle this.

Btw here is my template sensor:

{% set output = states('sensor.powerstream_inverter_output_watts')%}
{% set powerstream_online = False if states('sensor.powerstream_status') == "assume_offline" else True %}
{% set real_output = output if powerstream_online == True else 0.0 %}
{{ real_output }}