From c85edf15aca858e5395b74a66e084d4975c3ae9d Mon Sep 17 00:00:00 2001 From: Theo Arends Date: Thu, 29 Mar 2018 14:51:34 +0200 Subject: [PATCH] Change MQTT Energy response topic to SENSOR 5.12.0i * Change MQTT response topic for Energy changes from ENERGY to SENSOR (#2229, #2251) --- sonoff/_releasenotes.ino | 3 ++- sonoff/xdrv_03_energy.ino | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sonoff/_releasenotes.ino b/sonoff/_releasenotes.ino index 5a9ad3773..4b0a6d335 100644 --- a/sonoff/_releasenotes.ino +++ b/sonoff/_releasenotes.ino @@ -2,7 +2,8 @@ * Add 16 timers using commands Timer and Timers (#1091) * Add commands Timer 0 to clear timer and Timer 1..16 to copy timer * Add optional Timer configuration webpage to be enabled in user_config.h with define USE_TIMERS_WEB - * Add Home Assistant MQTT Discovery for Buttons (#2277) + * Change MQTT response topic for Energy changes from ENERGY to SENSOR (#2229, #2251) + * Add Home Assistant MQTT Discovery for Buttons and change SetOption19 response (#2277) * Change webpage parameter communication * * 5.12.0h diff --git a/sonoff/xdrv_03_energy.ino b/sonoff/xdrv_03_energy.ino index 8867ed298..a1052a077 100644 --- a/sonoff/xdrv_03_energy.ino +++ b/sonoff/xdrv_03_energy.ino @@ -778,7 +778,7 @@ void EnergyMqttShow() snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_JSON_TIME "\":\"%s\""), GetDateAndTime(DT_LOCAL).c_str()); EnergyShow(1); snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s}"), mqtt_data); - MqttPublishPrefixTopic_P(TELE, PSTR(D_RSLT_ENERGY), Settings.flag.mqtt_sensor_retain); + MqttPublishPrefixTopic_P(TELE, PSTR(D_RSLT_SENSOR), Settings.flag.mqtt_sensor_retain); energy_power_delta = 0; }