The transport from the max_halt_soc to batcontrol's always_allow_discharge + max_charge_soc is not correct.
If the max_halt_soc changes on during a charging session, the previous values are not stored in handle_battery_halt_soc. set_evcc_discharge_limit_on_batcontrol() is not