wills106 / homeassistant-solax-modbus

SolaX Power Modbus custom_component for Home Assistant (Supports some Ginlong Solis, Growatt, Sofar Solar, TIGO TSI & Qcells Q.Volt Hyb)
281 stars 85 forks source link

- skip duplicate gen4 / gen5 entities #877

Closed simowNgithub closed 1 month ago

simowNgithub commented 1 month ago
simowNgithub commented 1 month ago

@wills106 i found, that your integration gets issues if you use the same entity like "battery_power_charge" in two or more code blocks for the same gen4 / gen5 definition.

"battery_power_charge" should be a function, which get's calculated by battery_1_power_charge and battery_2_power_charge. Inverters with only one battery slot always got two values, the battery_1_power_charge and the summary battery_power_charge.

I was not deep enough in the code to get this work. Sorry.

wills106 commented 1 month ago

Your correct the same register shouldn't be read twice. I didn't realise this error was there as no way to test.

"battery_power_charge" should be a function, which get's calculated by battery_1_power_charge and battery_2_power_charge. Inverters with only one battery slot always got two values, the battery_1_power_charge and the summary battery_power_charge.

That's quite easy to do, as it's what we do for "PV Power Total"