“use” is the sum of Grid (positive import) and Solar (generation is negative)

power1pluspower2 is the better way to get “use” as when posting input1 and input2 individually (via mqtt) rather than part of a packet, there is no guarantee that one will always arrive before the other, in fact they will probably be processed simultaneously in separate threads so getting an accurate sum could be tricky.

You do calculate the “export” by using an allow negative on the grid input. If you have already used an allow positive there will be no negative element left in that processing chain, so you will need to reset to input or reset to zero +input to get the full grid value and then apply the allow negative.

2 Likes