Auto discovery deactivation at runtime by MQTT command (#856)
and switch automatic creation for it in HASS (by autodiscovery :-)
This commit is contained in:
1 parent
e8b4c63c6c
commit
2d377a1c3f
9 files changed
+94
-26
No files matched your search
@@ -292,6 +292,14 @@ void pubMqttDiscovery() {
|
||||
Gateway_AnnouncementMsg, will_Message, true, subjectMQTTtoSYSset, //set,payload_avalaible,payload_not avalaible ,is a gateway entity, command topic
|
||||
"", "", "", "" // device name, device manufacturer, device model, device mac
|
||||
);
|
||||
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
|
||||
"", "", "", "" // device name, device manufacturer, device model, device mac
|
||||
);
|
||||
|
||||
# ifdef ZsensorBME280
|
||||
# define BMEparametersCount 5
|
||||
|
||||
Reference in new issue
Block a user