[Breaking] Deactivate Home Assistant presence per default (#915)

And enable to activate it by MQTT
This commit is contained in:
Florian authored and GitHub committed 2021-04-04 19:34:36 -05:00
1 parent adc5f157cd
commit e1aef48296
5 files changed
+41 -18

No files matched your search

+8
View File
@@ -700,6 +700,14 @@ void pubMqttDiscovery() {
Gateway_AnnouncementMsg, will_Message, true, subjectMQTTtoBTset, //set,payload_avalaible,payload_not avalaible ,is a gateway entity, command topic
"", "", "", "", true // device name, device manufacturer, device model, device mac, retain
);
createDiscovery("switch", //set Type
"", "BT: Publish HASS presence", (char*)getUniqueId("hasspresence", "").c_str(), //set state_topic,name,uniqueId
"", "", "", //set availability_topic,device_class,value_template,
"{\"hasspresence\":true}", "{\"hasspresence\":false}", "", //set,payload_on,payload_off,unit_of_meas,
0, //set off_delay
Gateway_AnnouncementMsg, will_Message, true, subjectMQTTtoBTset, //set,payload_avalaible,payload_not avalaible ,is a gateway entity, command topic
"", "", "", "", true // device name, device manufacturer, device model, device mac, retain
);
# ifdef ESP32
createDiscovery("switch", //set Type
"", "SYS: Low Power Mode command", (char*)getUniqueId("lowpowermode", "").c_str(), //set state_topic,name,uniqueId