diff --git a/tasmota/xdrv_13_display.ino b/tasmota/xdrv_13_display.ino index 99869ecae..b7bbb90cb 100755 --- a/tasmota/xdrv_13_display.ino +++ b/tasmota/xdrv_13_display.ino @@ -1626,7 +1626,7 @@ void DisplayJsonValue(const char* topic, const char* device, const char* mkey, c DisplayLogBufferAdd(buffer); } -void DisplayAnalyzeJson(char *topic, char *json) +void DisplayAnalyzeJson(char *topic, const char *json) { // //tele/pow2/STATE {"Time":"2017-09-20T11:53:03", "Uptime":10, "Vcc":3.123, "POWER":"ON", "Wifi":{"AP":2, "SSId":"indebuurt2", "RSSI":68, "APMac":"00:22:6B:FE:8E:20"}} // //tele/pow2/ENERGY {"Time":"2017-09-20T11:53:03", "Total":6.522, "Yesterday":0.150, "Today":0.073, "Period":0.5, "Power":12.1, "Factor":0.56, "Voltage":210.1, "Current":0.102} diff --git a/tasmota/xdrv_23_zigbee_2a_devices_impl.ino b/tasmota/xdrv_23_zigbee_2a_devices_impl.ino index 6aecfaa82..eaa550f3b 100644 --- a/tasmota/xdrv_23_zigbee_2a_devices_impl.ino +++ b/tasmota/xdrv_23_zigbee_2a_devices_impl.ino @@ -526,9 +526,9 @@ void Z_Device::jsonPublishAttrList(const char * json_prefix, const Z_attribute_l // What key do we use, shortaddr or name? if (!Settings.flag5.zb_omit_json_addr) { if (use_fname) { - Response_P(PSTR("%s{\"%s\":"), TasmotaGlobal.mqtt_data, friendlyName); + ResponseAppend_P(PSTR("{\"%s\":"), friendlyName); } else { - Response_P(PSTR("%s{\"0x%04X\":"), TasmotaGlobal.mqtt_data, shortaddr); + ResponseAppend_P(PSTR("{\"0x%04X\":"), shortaddr); } } ResponseAppend_P(PSTR("{")); @@ -561,13 +561,13 @@ void Z_Device::jsonPublishAttrList(const char * json_prefix, const Z_attribute_l snprintf_P(subtopic, sizeof(subtopic), PSTR("%s"), stemp); } else { snprintf_P(subtopic, sizeof(subtopic), PSTR("%s/%s"), TasmotaGlobal.mqtt_topic, stemp); - } + } } else { if (Settings.flag5.zigbee_hide_bridge_topic) { snprintf_P(subtopic, sizeof(subtopic), PSTR("%04X"), shortaddr); } else { snprintf_P(subtopic, sizeof(subtopic), PSTR("%s/%04X"), TasmotaGlobal.mqtt_topic, shortaddr); - } + } } if (Settings.flag5.zb_topic_endpoint) { if (attr_list.isValidSrcEp()) { diff --git a/tasmota/xdrv_35_pwm_dimmer.ino b/tasmota/xdrv_35_pwm_dimmer.ino index 80b69d66f..93b7efb85 100644 --- a/tasmota/xdrv_35_pwm_dimmer.ino +++ b/tasmota/xdrv_35_pwm_dimmer.ino @@ -793,7 +793,7 @@ bool Xdrv35(uint8_t function) // If hold time has arrived and no rule is enabled that handles the button hold, handle it. else if (button_hold_time[button_index] <= now) { #ifdef USE_RULES - sprintf(TasmotaGlobal.mqtt_data, PSTR("{\"Button%u\":{\"State\":3}}"), button_index + 1); + Response_P(PSTR("{\"Button%u\":{\"State\":3}}"), button_index + 1); Rules.no_execute = true; if (!XdrvRulesProcess(0)) { #endif // USE_RULES