Energy Flow Diagram - Electric Power - update needed

Looking in Utilities at the energy flow diagram for electrical current, a misconception becomes apperent that leads to a wrong flow of energy. This can be fixed by implementing an additional parameter in the configuration and adapted math.

Here are some basic electrical facts:

  • Current flow for the phase measured of the grid is either zero, or a non-zero value.
  • It can be measured in one variable which is then a positive or negative value or with two values. The latter can only be zero or positive.
  • Finally you get zero (no current flow) and mutual exclusive production and consumption on the grid.
  • Current flow is always shortest path/least resistance
  • Current injected to the wire by an additional source is consumed by the nearest consumer on the wire.
  • Solar is never a consumer.


  1. Having Grid and Home ONLY:
    Flow can only go from grid to home.
    Grid production == Home consumption
  2. Adding Solar ONLY to (1)
    Current flow direction is defined by the quantity of injected energy compared to grid values (see above)
    Solar is a producer only and never a consumer
    Home consumption == Injection - Grid consumption + Grid production
  3. Adding Battery (UPS) ONLY to (1)
    Current flow direction is defined by the quantity of injected energy compared to grid values (see above)
    Battery can be a producer (injecting) OR a consumer (charging) sourced from the grid, but ever at the same time!
    Home consumption == Injection + Grid production
  4. Adding Solar + Battery but as independent devices to (1), assuming that both are connected to the same wire.
    This is just a combination of 2 and 3 and the energy flow is clear
    Home consumption == sum(Injection) - Grid consumption + Grid production - Battery consumption

For 1 - 4, the energy flow is clear based on the source values and can be directly derived from. The current energy flow needs checking if it follows the scenarious described.

Now comes the tricky part that needs attention:

  1. Adding Solar + Battery but as dependent devices to (1)
    At that point, Solar and Battery must be seen as unit though printed individually and following rules apply:
    – Solar is connected to the Battery ONLY
    – Only the Battery is connected to the wire (= no battery charging from the grid !!)
    – Any current not used for charging the battery flows into the wire
    Technically, all needed variables stay the same as described in 1-4 BUT we need a kind of radio-button that tells if solar/battery are independent or dependent. In the dependent case:
    a.) there NEVER must be a current flow from the grid to the battery.
    b.) though the battery is the injection source, the flow can be shown as follows and all can happen at the same time:
    – energy flows from solar to battery (charging case): driver: battery charging value
    – energy flows from battery to wire (injection case): driver: battery injection value
    – energy flows from battery to grid (grid consumer case): driver: battery injection and grid consumer value
    – engery flow from solar to grid: this is the culprit - we can either show battery to grid OR solar to grid but not both !! Preferable battery to grid as it matches reality.

Why is a change needed: the dependent case is not matched but reality. Current flow is at the moment wrong for that case and confusing and the values shown do not match what is happening on the producer and consumer sides.

It can be, but it isn’t. That is not the way the energy dashboard has been set up. It is easy enough to make template consumption and return sensors from one sensor that reads +/- though.

Only if your load matches your production.

False. Current flow is proportional to the resistance. If you have one path that has lower resistance more current will flow that path but not all.

Very false. See Kirchhoff’s Current Law.

Unless you have a rather bad fault. I fail to see the relevance of this point.

Maybe in your system (I’m assuming it is DC coupled?). But there are plenty of AC coupled battery systems that do not operate this way. They can charge from the grid or solar and have their own supply inverter.

So I think what all that boils down to is that you are saying that the energy dashboard does not suit DC coupled battery systems well?

To either get it directly or via templates is not the point. It is important that it is available with whatever method used.

This is always the case, by definition of electricity. sum(input) = sum(load). If you have more input than load, it will flow back to the grid and gets consumed there.

Ok, maybe technically not written exactly - sorry. But the point I wanted to highlight is, that if you inject energy into the wire, it will be consumed there as long there is local load. Anything else wil go back into the grid. I hope we can agree on that…

Not discussing a faulty circuit where there is hopefully a breaker in between. The point is, that there is never a current flow from the grid to solar and therefore this should never be shown as current flow direction.

This is exacly the point I described in (4). Technically they are independent. If solar injects enegry, it can be consumed by the battery for charging. I am not arguing about that one.

Yes. I have described that as “dependent” systems. I am not sticking to a naming, but the setup/behaviour. I hope that brings more light into the issue.

Thanks for the quick response!

Related request: Energy Dashboard - Charge Batteries from Grid - #3 by tjstone31