mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 12:46:34 +00:00
Some code refactoring
This commit is contained in:
parent
eb5ebfbf0f
commit
e57bbb2b7d
@ -89,7 +89,7 @@ void LM75ADShow(bool json)
|
||||
dtostrfd(t, Settings.flag2.temperature_resolution, temperature);
|
||||
|
||||
if (json) {
|
||||
ResponseAppend_P(PSTR(",\"LM75AD\":{\"" D_JSON_TEMPERATURE "\":%s}"), temperature);
|
||||
ResponseAppend_P(JSON_SNS_TEMP, "LM75AD", temperature);
|
||||
#ifdef USE_DOMOTICZ
|
||||
if (0 == tele_period) DomoticzSensor(DZ_TEMP, temperature);
|
||||
#endif // USE_DOMOTICZ
|
||||
|
@ -184,7 +184,7 @@ void DS1624Show(bool json)
|
||||
|
||||
dtostrfd(ds1624_sns[i].value, Settings.flag2.temperature_resolution, temperature);
|
||||
if (json) {
|
||||
ResponseAppend_P(PSTR(",\"%s\":{\"" D_JSON_TEMPERATURE "\":%s}"), ds1624_sns[i].name, temperature);
|
||||
ResponseAppend_P(JSON_SNS_TEMP, ds1624_sns[i].name, temperature);
|
||||
if ((0 == tele_period) && once) {
|
||||
#ifdef USE_DOMOTICZ
|
||||
DomoticzSensor(DZ_TEMP, temperature);
|
||||
|
@ -85,7 +85,7 @@ void MCP9808Show(bool json) {
|
||||
}
|
||||
|
||||
if (json) {
|
||||
ResponseAppend_P(PSTR(",\"%s\":{\"" D_JSON_TEMPERATURE "\":%s}"), sensor_name, temperature);
|
||||
ResponseAppend_P(JSON_SNS_TEMP, sensor_name, temperature);
|
||||
if ((0 == tele_period) && (0 == i)) {
|
||||
#ifdef USE_DOMOTICZ
|
||||
DomoticzSensor(DZ_TEMP, temperature);
|
||||
|
Loading…
x
Reference in New Issue
Block a user