From e20c2b056ad702bedd09a1ff62af1a62afd7adbe Mon Sep 17 00:00:00 2001 From: Adrian Scillato <35405447+ascillato@users.noreply.github.com> Date: Mon, 27 Aug 2018 18:35:23 -0300 Subject: [PATCH] Added Optional Retain Flag for Energy Margins Request #3612 --- sonoff/xdrv_03_energy.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sonoff/xdrv_03_energy.ino b/sonoff/xdrv_03_energy.ino index 1e73d3f03..4ea594cdb 100644 --- a/sonoff/xdrv_03_energy.ino +++ b/sonoff/xdrv_03_energy.ino @@ -752,7 +752,7 @@ void EnergyMarginCheck() } if (jsonflg) { snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s}"), mqtt_data); - MqttPublishPrefixTopic_P(TELE, PSTR(D_RSLT_MARGINS)); + MqttPublishPrefixTopic_P(TELE, PSTR(D_RSLT_MARGINS), MQTT_TELE_RETAIN); EnergyMqttShow(); } } @@ -1238,4 +1238,4 @@ boolean Xsns03(byte function) return result; } -#endif // USE_ENERGY_SENSOR \ No newline at end of file +#endif // USE_ENERGY_SENSOR