Open joeshaw opened 6 years ago
The getCharging function determines if the car by calling indexOf("CHARGING") but this matches "NOT_CHARGING" as well, resulting in a false positive.
getCharging
indexOf("CHARGING")
"NOT_CHARGING"
🍃 api BatteryStatusRecordsRequest 👍 { status: 200, VoltLabel: { HighVolt: '240', LowVolt: '120' }, BatteryStatusRecords: { OperationResult: 'START', OperationDateAndTime: '2017/10/30 23:55', BatteryStatus: { BatteryChargingStatus: 'NOT_CHARGING', BatteryCapacity: '240', BatteryRemainingAmount: '140', BatteryRemainingAmountWH: '14320', BatteryRemainingAmountkWH: '', SOC: [Object] }, PluginState: 'CONNECTED', CruisingRangeAcOn: '97000', CruisingRangeAcOff: '103000', NotificationDateAndTime: '2017/10/30 23:56', TargetDate: '2017/10/30 23:55' } }
The
getCharging
function determines if the car by callingindexOf("CHARGING")
but this matches"NOT_CHARGING"
as well, resulting in a false positive.