Closed BrettLynch123 closed 10 months ago
Ok I managed to find time to make a PR however it Would need testing to make sure it doesn't break with other inverters. Tested with my SH10RT
https://github.com/mkaiser/Sungrow-SHx-Inverter-Modbus-Home-Assistant/pull/140
Hi I had a problem where my sr10rt didn't know if it was charging or discharging. Anyway long story short I changed this code line from https://github.com/mkaiser/Sungrow-SHx-Inverter-Modbus-Home-Assistant/blob/main/modbus_sungrow.yaml#L1765C1-L1765C85
{{ states('sensor.running_state')|int(default=0)|bitwise_and(0x2) > 0 }}
to
{% if states('sensor.running_state')|int(default=0)|bitwise_and(0x2) > 0 %} on {% else %} off {% endif %}
and did this to the discharge logic on this line https://github.com/mkaiser/Sungrow-SHx-Inverter-Modbus-Home-Assistant/blob/main/modbus_sungrow.yaml#L1809
{% if states('sensor.running_state')|int(default=0)|bitwise_and(0x4) > 0 %} on {% else %} off {% endif %}
Which seemed to fix the issue for me. Sorry don't have time to make a proper PR but wanted to possibly help others.