house_battery_total_max_available_energy stays 0 after a Home Assistant restart (initial: 0 combined with the rbe node)
Version: package shipped with flow tab "Home Battery Start v4.15.0", Home Assistant 2026.9.3.
The helper is defined with initial: 0 (around line 185), so Home Assistant does not
restore its last state after a restart but takes the initial value.
The only writer is the "Max usable energy" service node in the flow, fed through an rbe ("On change") node. After a restart the recomputed value is identical to the last one the rbe saw, so the rbe blocks it and the helper stays at 0 until a cutoff setting changes or Node-RED is redeployed.
Consequences:
sensor.charge_target_energyis always 0.0, because it computesmax(max_energy - surplus, 0).binary_sensor.solar_surplus_covers_battery_capacityand its tomorrow variant are always "on", because any surplus is >= 0.
Observed history on my install:
- 13 Sep 03:11:51 -> 13.6704 (the only time the flow ever wrote it)
- 13 Sep 03:12:17 -> 0.0 (26 seconds later, a config reload)
- nothing for the next six days, while the flow kept computing 13.6704
house_battery_total_available_energy (around line 175) has the same initial: 0, but
that value changes continuously so the rbe keeps letting it through and it recovers by
itself.
Possible fixes: drop initial: from these two helpers so Home Assistant restores
the last value, or have the flow write the totals on a Home Assistant start event (or
on a timer) so the rbe is not the only gate.
Duplicate of #184, fix in #193