mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-24 11:16:34 +00:00
parent
dde7364b69
commit
799f05dedf
@ -431,15 +431,11 @@ void Ds18x20Show(bool json)
|
||||
Ds18x20Name(i);
|
||||
|
||||
if (json) {
|
||||
if (1 == ds18x20_sensors) {
|
||||
ResponseAppend_P(JSON_SNS_TEMP, ds18x20_types, temperature);
|
||||
} else {
|
||||
char address[17];
|
||||
for (uint32_t j = 0; j < 6; j++) {
|
||||
sprintf(address+2*j, "%02X", ds18x20_sensor[index].address[6-j]); // Skip sensor type and crc
|
||||
}
|
||||
ResponseAppend_P(PSTR(",\"%s\":{\"" D_JSON_ID "\":\"%s\",\"" D_JSON_TEMPERATURE "\":%s}"), ds18x20_types, address, temperature);
|
||||
char address[17];
|
||||
for (uint32_t j = 0; j < 6; j++) {
|
||||
sprintf(address+2*j, "%02X", ds18x20_sensor[index].address[6-j]); // Skip sensor type and crc
|
||||
}
|
||||
ResponseAppend_P(PSTR(",\"%s\":{\"" D_JSON_ID "\":\"%s\",\"" D_JSON_TEMPERATURE "\":%s}"), ds18x20_types, address, temperature);
|
||||
#ifdef USE_DOMOTICZ
|
||||
if ((0 == tele_period) && (0 == i)) {
|
||||
DomoticzSensor(DZ_TEMP, temperature);
|
||||
|
Loading…
x
Reference in New Issue
Block a user