mirror of
https://github.com/arendst/Tasmota.git
synced 2025-04-25 07:17:16 +00:00
Merge pull request #10381 from barbudor/pr_hx711_json
add missing quotes around %s in JSON response
This commit is contained in:
commit
1e49cb5a2a
@ -264,7 +264,7 @@ bool HxCommand(void)
|
|||||||
char item[33];
|
char item[33];
|
||||||
dtostrfd((float)Settings.weight_item / 10, 1, item);
|
dtostrfd((float)Settings.weight_item / 10, 1, item);
|
||||||
Response_P(PSTR("{\"Sensor34\":{\"" D_JSON_WEIGHT_REF "\":%d,\"" D_JSON_WEIGHT_CAL "\":%d,\"" D_JSON_WEIGHT_MAX "\":%d,\""
|
Response_P(PSTR("{\"Sensor34\":{\"" D_JSON_WEIGHT_REF "\":%d,\"" D_JSON_WEIGHT_CAL "\":%d,\"" D_JSON_WEIGHT_MAX "\":%d,\""
|
||||||
D_JSON_WEIGHT_ITEM "\":%s,\"" D_JSON_WEIGHT_CHANGE "\":%s,\"" D_JSON_WEIGHT_DELTA "\":%d}}"),
|
D_JSON_WEIGHT_ITEM "\":%s,\"" D_JSON_WEIGHT_CHANGE "\":\"%s\",\"" D_JSON_WEIGHT_DELTA "\":%d}}"),
|
||||||
Settings.weight_reference, Settings.weight_calibration, Settings.weight_max * 1000,
|
Settings.weight_reference, Settings.weight_calibration, Settings.weight_max * 1000,
|
||||||
item, GetStateText(Settings.SensorBits1.hx711_json_weight_change), Settings.weight_change);
|
item, GetStateText(Settings.SensorBits1.hx711_json_weight_change), Settings.weight_change);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user