Skip to content

Commit

Permalink
[Discovery] Re-add the discovery switch
Browse files Browse the repository at this point in the history
revert #1365, indeed the switch may be usefull to avoid non desirable discovery of RTL_433 or BT devices  #1487
  • Loading branch information
1technophile committed Mar 6, 2023
1 parent 6e8ada4 commit bbe89af
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions main/ZmqttDiscovery.ino
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,15 @@ void pubMqttDiscovery() {
"", "", "", "", false, // device name, device manufacturer, device model, device ID, 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
);
# endif
# ifdef ZboardM5STACK
createDiscovery("sensor", //set Type
Expand Down

0 comments on commit bbe89af

Please sign in to comment.