Fix incorrect handling of energy rate when charging
When a battery is being charged, EnergyRate is negative, and the value shouldn't be separately handled when calculating the total rate, otherwise setBatteryRate will report a wrong remaining time.
Edited by Fushan Wen