From b1ea413eae126270143896d98b7cca29bda66178 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbyn=C4=9Bk=20Kocur?= Date: Mon, 3 Apr 2023 16:47:44 +0200 Subject: [PATCH] Update xsns_86_tfminiplus.ino: FIX json output (#18321) Fixes JSON measurement output. Output numbers like Distance and SignalStrength were published as a string. Now they have the right data type. --- tasmota/tasmota_xsns_sensor/xsns_86_tfminiplus.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasmota/tasmota_xsns_sensor/xsns_86_tfminiplus.ino b/tasmota/tasmota_xsns_sensor/xsns_86_tfminiplus.ino index ea32fcb22..02cce9e27 100644 --- a/tasmota/tasmota_xsns_sensor/xsns_86_tfminiplus.ino +++ b/tasmota/tasmota_xsns_sensor/xsns_86_tfminiplus.ino @@ -191,7 +191,7 @@ void TfmpShow(bool json) { float distance = (float)tfminiplus_sensor.distance; // cm if (json) { - ResponseAppend_P(PSTR(",\"%s\":{\"" D_JSON_DISTANCE "\":\"%1_f\",\"" D_JSON_SIGNALSTRENGTH "\":\"%d\",\"" D_JSON_CHIPTEMPERATURE "\":%d}"), + ResponseAppend_P(PSTR(",\"%s\":{\"" D_JSON_DISTANCE "\":%1_f,\"" D_JSON_SIGNALSTRENGTH "\":%d,\"" D_JSON_CHIPTEMPERATURE "\":%d}"), sensor_name, &distance, tfminiplus_sensor.sigstrength, tfminiplus_sensor.chiptemp); #ifdef USE_DOMOTICZ if (0 == TasmotaGlobal.tele_period) { @@ -242,4 +242,4 @@ bool Xsns86(uint32_t callback_id) } return result; } -#endif // USE_TFMINIPLUS \ No newline at end of file +#endif // USE_TFMINIPLUS