[DISC] Add BT scan duration parameter auto discovery (#1762)

* [DISC] Add BT scan duration parameter auto discovery

* Add doc
This commit is contained in:
Florian authored and GitHub committed 2023-09-30 07:26:57 -05:00
1 parent 246423a8a8
commit 3470882da0
2 files changed
+24 -28

No files matched your search

+9
View File
@@ -1146,6 +1146,15 @@ void pubMqttDiscovery() {
"", "", "", "", false, // device name, device manufacturer, device model, device ID, retain
stateClassNone //State Class
);
createDiscovery("number", //set Type
subjectBTtoMQTT, "BT: Scan duration", (char*)getUniqueId("scanduration", "").c_str(), //set state_topic,name,uniqueId
will_Topic, "", "{{ value_json.scanduration/1000 }}", //set availability_topic,device_class,value_template,
"{\"scanduration\":{{value*1000}},\"save\":true}", "", "s", //set,payload_on,payload_off,unit_of_meas,
0, //set off_delay
Gateway_AnnouncementMsg, will_Message, true, subjectMQTTtoBTset, //set,payload_available,payload_not available,is a gateway entity, command topic
"", "", "", "", false, // device name, device manufacturer, device model, device ID, retain
stateClassNone //State Class
);
createDiscovery("button", //set Type
will_Topic, "BT: Force scan", (char*)getUniqueId("force_scan", "").c_str(), //set state_topic,name,uniqueId
will_Topic, "", "", //set availability_topic,device_class,value_template,