Fix JSON format for EnergyToday Command Response

This commit is contained in:
Adrian Scillato 2021-11-06 21:20:48 -03:00 committed by GitHub
parent f2b08bba52
commit c48ff05463
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -600,7 +600,7 @@ void ResponseCmndEnergyTotalYesterdayToday(void) {
Energy.total[i] = (float)(RtcSettings.energy_kWhtotal_ph[i] + Energy.kWhtoday_offset[i] + Energy.kWhtoday[i]) / 100000;
}
Response_P(PSTR("{\"%s\":{\"" D_JSON_TOTAL "\":%s,\"" D_JSON_YESTERDAY "\":%s,\"" D_JSON_TODAY "\":%s}"),
Response_P(PSTR("{\"%s\":{\"" D_JSON_TOTAL "\":%s,\"" D_JSON_YESTERDAY "\":%s,\"" D_JSON_TODAY "\":%s}}"),
XdrvMailbox.command,
EnergyFormat(value_chr, Energy.total, Settings->flag2.energy_resolution, true),
EnergyFormat(value2_chr, energy_yesterday_ph, Settings->flag2.energy_resolution, true),