From 85a4fd6e15ef0b21189cabf4e9c99247102740e4 Mon Sep 17 00:00:00 2001 From: Florian Date: Mon, 19 Dec 2022 08:51:36 -0600 Subject: [PATCH] Remove auto discovery switch (#1365) I don't think there is usage for such a switch into HA, if you see it, auto discovery was already activated and all the entities created, so you will have to go to the mqtt client to remove the retained messages. If you don't want auto discovery as an HA user you would have to go to the mqtt client to send the discovery message deactivation. So either way as a HA user you have to go to a client. And as people not wanting to use auto discovery with HA are the people that are not using HA this switch as a little value. --- main/ZmqttDiscovery.ino | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/main/ZmqttDiscovery.ino b/main/ZmqttDiscovery.ino index 3095cf2..12f4c5c 100644 --- a/main/ZmqttDiscovery.ino +++ b/main/ZmqttDiscovery.ino @@ -519,16 +519,6 @@ void pubMqttDiscovery() { "", "", "", "", false, // device name, device manufacturer, device model, device MAC, retain stateClassNone //State Class ); - createDiscovery("switch", //set Type - "", "SYS: Auto discovery", (char*)getUniqueId("discovery", "").c_str(), //set state_topic,name,uniqueId - will_Topic, "", "", //set availability_topic,device_class,value_template, - "{\"discovery\":true}", "{\"discovery\":false}", "", //set,payload_on,payload_off,unit_of_meas, - 0, //set off_delay - Gateway_AnnouncementMsg, will_Message, true, subjectMQTTtoSYSset, //set,payload_avalaible,payload_not avalaible ,is a gateway entity, command topic - "", "", "", "", true, // device name, device manufacturer, device model, device MAC, retain, - stateClassNone //State Class - ); - # ifdef ZsensorBME280 # define BMEparametersCount 5 Log.trace(F("bme280Discovery" CR));