From 766e05b997d8663779dd8bb455e3510c7631b3f2 Mon Sep 17 00:00:00 2001 From: arendst Date: Thu, 12 Oct 2017 14:38:28 +0200 Subject: [PATCH] v5.8.0k - Missed one Add retain to ENERGY messages controlled by command SensorRetain (#1013) --- sonoff/xsns_hlw8012.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonoff/xsns_hlw8012.ino b/sonoff/xsns_hlw8012.ino index ea9a222b1..875b06de1 100644 --- a/sonoff/xsns_hlw8012.ino +++ b/sonoff/xsns_hlw8012.ino @@ -668,7 +668,7 @@ void hlw_mqttPresent(byte option) // {"Time":"2017-03-04T13:37:24", "Total":0.013, "Yesterday":0.013, "Today":0.000, "Period":0, "Power":0, "Factor":0.00, "Voltage":0, "Current":0.000} snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_TIME "\":\"%s\", "), getDateTime().c_str()); hlw_mqttStat(option); - mqtt_publish_topic_P(2, PSTR(D_RSLT_ENERGY)); + mqtt_publish_topic_P(2, PSTR(D_RSLT_ENERGY), sysCfg.flag.mqtt_sensor_retain); } void hlw_mqttStatus()