tolwi / hassio-ecoflow-cloud

EcoFlow Cloud Integration for Home Assistant
382 stars 64 forks source link

Energy panel HA no powerstream #262

Open hardyn66a opened 3 months ago

hardyn66a commented 3 months ago

Why can't you insert the Powerstream yield into the HA energy panel?

Nid01 commented 3 months ago

What exactly do you mean by yield? Please provide more details.

nemhods commented 3 months ago

I think he means the "energy" dashboard in this panel: Screenshot 2024-07-17 155517

After reading this documentation: https://www.home-assistant.io/docs/energy/faq/#troubleshooting-missing-entities, it seems that HA requires a sensor of type "total" or "total_increasing". The total production value is something that the official ecoflow app supports and displays, but it doesn't seem to be part of the device data that Ecoflow provides through the /devices/quota API (and probably similarly with MQTT). If i'm reading the API docs correctly, this information is simply not offered for now.

The HA energy docs state:

If you have a sensor that returns instantaneous power readings (W or kW), then to add a sensor that returns energy usage or generation (kWh), refer to the Riemann sum integral integration.

This is probably a bit imprecise, as it assumes the momentanous power production was there all the time since the last update. I did not yet test this properly, but using this Helper (Settings -> Devices -> Helpers -> Create Helper (Integral)) I was able to add it to the dashboard. Screenshot 2024-07-17 161236

Dev-Fabry commented 1 month ago

the @nemhods solution is correct, this issue can be closed