This commit is contained in:
CaCO3
2022-10-27 23:10:39 +02:00
parent af8b7d6824
commit 44f61c7c91

View File

@@ -70,19 +70,17 @@ void sendHomeAssistantDiscoveryTopic(std::string maintopic, std::string group, s
} }
payload += payload +=
"\"avty_t\": \"~/" + std::string(LWT_TOPIC) + "\"," + nl + "\"availability_topic\": \"~/connection\"," + nl +
"\"pl_avail\": \"" + LWT_CONNECTED + "\"," + nl + "\"payload_available\": \"connected\"," + nl +
"\"pl_not_avail\": \"" + LWT_DISCONNECTED + "\"," + nl; "\"payload_not_available\": \"connection lost\"," + nl;
payload += payload +=
"\"device\": {" + nl + "\"device\": {" + nl +
"\"ids\": [\"" + maintopic + "\"]," + nl + "\"identifiers\": [\"" + maintopic + "\"]," + nl +
"\"name\": \"" + maintopic + "\"," + nl + "\"name\": \"" + maintopic + "\"," + nl +
"\"model\": \"Meter Digitizer\"," + nl + "\"model\": \"HomeAssistant Discovery for AI on the Edge Device\"," + nl +
"\"mf\": \"AI on the Edge Device\"," + nl + "\"manufacturer\": \"AI on the Edge Device\"," + nl +
"\"sw\": \"" + version + "\"" + nl + "\"sw_version\": \"" + version + "\"" + nl +
"\"hw\": \"ESP32-CAM\"" + nl +
"\"cu\": \"https://" + *getIPAddress() + "\"" + nl +
"}" + nl + "}" + nl +
"}" + nl; "}" + nl;