Skip to content

Commit c3f36e9

Browse files
committed
fix json for tesla status output
1 parent 92f4d1d commit c3f36e9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/web_server.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,13 +684,14 @@ handleStatus(MongooseHttpServerRequest *request) {
684684
{
685685
const TESLA_CHARGE_INFO *tci = teslaClient.getChargeInfo();
686686
if (tci->isValid) {
687+
s += ",";
687688
s += "\"batteryRange\":" + String(tci->batteryRange) + ",";
688689
s += "\"chargeEnergyAdded\":" + String(tci->chargeEnergyAdded) + ",";
689690
s += "\"chargeMilesAddedRated\":" + String(tci->chargeMilesAddedRated) + ",";
690691
s += "\"batteryLevel\":" + String(tci->batteryLevel) + ",";
691692
s += "\"chargeLimitSOC\":" + String(tci->chargeLimitSOC) + ",";
692693
s += "\"timeToFullCharge\":" + String(tci->timeToFullCharge) + ",";
693-
s += "\"chargerVoltage\":" + String(tci->chargerVoltage) + ",";
694+
s += "\"chargerVoltage\":" + String(tci->chargerVoltage);
694695
}
695696
}
696697

0 commit comments

Comments
 (0)