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.
This commit is contained in:
Florian authored and GitHub committed 2022-12-19 08:51:36 -06:00
1 parent 25d921580d
commit 85a4fd6e15
1 file changed
-10
-10
View File
@@ -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));