Energy sensor from power meter

Hi,
I am a newbie with home assistant, but I would like to perspectively steer a electric heater insider my boiler via home assistant such that my photovoltaic energy is used optimally.
As a first step, I installed HA, and found my Fronius Inverter, my Smartmeter and battery. But now I struggle with setting up the Energy Card correctly.
I do have the sensor topics “Energy real consumed” and “Energy real produced” and connected. But for the in- and output of the battery and the energy flowing into the grid, I only have power readings.
Important to note is that the power of the in- and output of the battery can be both positive and negative (for in and outlflow).
Therefore two questions:

  1. How can I setup the two-way power sensors in order to generate the required signals? I tried to use the Riemann integral, but I failed because the resulting Energy monitor of course counts forward and backward. I know how to program, and I think I have to reconfigure the yaml file, but I could not find a guide on how to achieve this task…
  2. Why does the power card use Energy (kWh) instead of Energy flow (power, kW)? Would that not be the much more intuitive setup? I mean, for most appliances I am rather interested if I have for example 2kW left in order to power my washing machine then if said machine consumed 0.5kWh right? Why was the design of the power card chosen like this?

Please do not hesitate to call out if such questions have already been answered, of where to find a good guide on this topic…
Thanks in advance

Hi :wave:!
Have a look at the documentation, it’s all there. Fronius - Home Assistant

It’s an energy dashboard - it uses energy. I guess probably because many integrations don’t provide live power readings and would therefore not work. Also keep in mind that the energy dashboard is populated only every hour. It’s for statistics.

For live controlling of some application you can just use an automation with power entities if you like.

Oh, and there is also a great, very detailed thread about exactly this: Howto: Fronius Integration with battery into Energy Dashboard

Oh, I did not see that there was an extra Support page for this! Thanks so much!