Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions custom_components/solax_modbus/plugin_solax.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,9 @@ def autorepeat_function_remotecontrol_recompute(initval: int, descr: Any, datadi
ap_target = 0 - pv_power
power_control = "Enabled Power Control"

elif power_control == "Disabled":
else:
# Otherwise disabled or unknown mode. Mark as disabled.
power_control = "Disabled"
ap_target = target

# Debug logging: Target calculation
Expand Down Expand Up @@ -1056,7 +1058,9 @@ def autorepeat_function_powercontrolmode8_recompute(initval: int, descr: Any, da
elif power_control == "Enabled Grid Control":
pushmode_power = pushmode_power + houseload - pv
pvlimit = setpvlimit
elif power_control == "Disabled":
else:
# Otherwise disabled or unknown mode. Mark as disabled.
power_control = "Disabled"
pvlimit = setpvlimit
# limit import to max import (capacity tarif in some countries)
old_pushmode_power = pushmode_power
Expand Down
Loading