marstek-venus-rs485-node-red icon indicating copy to clipboard operation
marstek-venus-rs485-node-red copied to clipboard

house_battery_total_max_available_energy stays 0 after a Home Assistant restart (initial: 0 combined with the rbe node)

Open RoyalFTH opened this issue 2 months ago • 1 comments

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_energy is always 0.0, because it computes max(max_energy - surplus, 0).
  • binary_sensor.solar_surplus_covers_battery_capacity and 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.

RoyalFTH avatar Sep 19 '26 19:09 RoyalFTH

Duplicate of #184, fix in #193

RoyalFTH avatar Oct 08 '26 08:10 RoyalFTH