refactor in single append

This commit is contained in:
Barbudor 2021-08-31 18:01:01 +02:00
parent 8033917a36
commit 62946c22b0

View File

@ -235,9 +235,7 @@ void sns_opentherm_stat(bool json)
if (json) if (json)
{ {
ResponseAppend_P(PSTR(",\"OPENTHERM\":{")); ResponseAppend_P(PSTR(",\"OPENTHERM\":{\"conn\":\"%s\",\"settings\":%d"), statusStr, Settings->ot_flags);
ResponseAppend_P(PSTR("\"conn\":\"%s\","), statusStr);
ResponseAppend_P(PSTR("\"settings\":%d"), Settings->ot_flags);
sns_opentherm_dump_telemetry(); sns_opentherm_dump_telemetry();
ResponseJsonEnd(); ResponseJsonEnd();
#ifdef USE_WEBSERVER #ifdef USE_WEBSERVER