Hi Rob,
I just found a bug in this thread: ESS not working correctly in V3.70 when peakshaving - #31 by iburger
And the line of code involved is identical, although in a different branch. It’s the calculation of how much battery power to use to get the grid to the right value. We’re making progress.