From bbaabcc20d862b35d15045c096d8114cf52045ae Mon Sep 17 00:00:00 2001 From: Florian <1technophile@users.noreply.github.com> Date: Mon, 10 Oct 2022 18:30:46 -0500 Subject: [PATCH] Fix missing lowpowermode attribute (#1281) LowPowerMode is not used outside of the BT gateway, removing it from discoveyr fixes #1267 --- main/ZmqttDiscovery.ino | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main/ZmqttDiscovery.ino b/main/ZmqttDiscovery.ino index 972d5e8..c557a22 100644 --- a/main/ZmqttDiscovery.ino +++ b/main/ZmqttDiscovery.ino @@ -400,6 +400,7 @@ void pubMqttDiscovery() { # endif # endif # ifdef ESP32 +# ifdef ZgatewayBT createDiscovery("sensor", //set Type subjectSYStoMQTT, "SYS: Low Power Mode", (char*)getUniqueId("lowpowermode", "").c_str(), //set state_topic,name,uniqueId "", "", "{{ value_json.lowpowermode }}", //set availability_topic,device_class,value_template, @@ -409,6 +410,7 @@ void pubMqttDiscovery() { "", "", "", "", false, // device name, device manufacturer, device model, device MAC stateClassNone //State Class ); +# endif # if defined(ZboardM5STICKC) || defined(ZboardM5STICKCP) || defined(ZboardM5TOUGH) createDiscovery("sensor", //set Type subjectSYStoMQTT, "SYS: Bat voltage", (char*)getUniqueId("m5batvoltage", "").c_str(), //set state_topic,name,uniqueId