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

battery_time_remaining always shows "Charging": stale entity reference in house_battery_control.yaml

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, 3x Marstek Venus.

In packages/house_battery_control.yaml the template sensor "House Total Battery Power" is defined around line 845 and produces sensor.house_total_battery_power.

Seven lines below, sensor.battery_time_remaining (around line 888) still reads the old entity id:

{% set power = max(0, states('sensor.house_total_battery_power_in_w') | float(0)) %}

That entity does not exist. float(0) turns it into 0, so the if power > 0 branch is never taken and the sensor always renders the else branch.

Observed: sensor.battery_time_remaining = "Charging (13.67 kWh)" while sensor.house_total_battery_power = 18 W, i.e. the batteries are discharging. It never shows a remaining time.

Fix: change that one reference to sensor.house_total_battery_power.

Careful: the string appears twice in the file. The unique_id: "house_total_battery_power_in_w" a few lines above should stay unchanged, otherwise existing installs end up with an orphaned entity and a new one.

RoyalFTH avatar Sep 19 '26 19:09 RoyalFTH

Duplicate of #129

RoyalFTH avatar Oct 08 '26 07:10 RoyalFTH