From 59f50d04f2c0f1bca8d949d913a68dcfff3801e9 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 20 Jul 2020 16:41:05 +0200 Subject: [PATCH] Allow rules on energy margins Allow rules on energy margins (#8935) --- tasmota/xdrv_03_energy.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasmota/xdrv_03_energy.ino b/tasmota/xdrv_03_energy.ino index afa818913..0afeec26b 100644 --- a/tasmota/xdrv_03_energy.ino +++ b/tasmota/xdrv_03_energy.ino @@ -306,7 +306,7 @@ void EnergyMarginCheck(void) uint16_t energy_power_u = (uint16_t)(Energy.active_power[0]); bool jsonflg = false; - Response_P(PSTR("{")); + Response_P(PSTR("{\"" D_RSLT_MARGINS "\":{")); if (Settings.energy_power_delta) { int16_t power_diff = energy_power_u - Energy.power_history[0]; @@ -369,7 +369,7 @@ void EnergyMarginCheck(void) } } if (jsonflg) { - ResponseJsonEnd(); + ResponseJsonEndEnd(); MqttPublishPrefixTopic_P(TELE, PSTR(D_RSLT_MARGINS), MQTT_TELE_RETAIN); XdrvRulesProcess(); EnergyMqttShow();