Solar power charging and discharging at the same time