Describe the bug
The calculate_current_for_power_kw function reduces the battery's target power and current to what is available given SOC. There's a bug in the charging portion where the reduced power and current should have been negative.
Thanks to @jaredthomas68 for tracking this down