From 44f61c7c91ebb3b263de2e4205120c099c5afaea Mon Sep 17 00:00:00 2001 From: CaCO3 Date: Thu, 27 Oct 2022 23:10:39 +0200 Subject: [PATCH] . --- .../jomjol_flowcontroll/ClassFlowMQTT.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/code/components/jomjol_flowcontroll/ClassFlowMQTT.cpp b/code/components/jomjol_flowcontroll/ClassFlowMQTT.cpp index 0a6e4ac7..634a3939 100644 --- a/code/components/jomjol_flowcontroll/ClassFlowMQTT.cpp +++ b/code/components/jomjol_flowcontroll/ClassFlowMQTT.cpp @@ -70,19 +70,17 @@ void sendHomeAssistantDiscoveryTopic(std::string maintopic, std::string group, s } payload += - "\"avty_t\": \"~/" + std::string(LWT_TOPIC) + "\"," + nl + - "\"pl_avail\": \"" + LWT_CONNECTED + "\"," + nl + - "\"pl_not_avail\": \"" + LWT_DISCONNECTED + "\"," + nl; + "\"availability_topic\": \"~/connection\"," + nl + + "\"payload_available\": \"connected\"," + nl + + "\"payload_not_available\": \"connection lost\"," + nl; payload += "\"device\": {" + nl + - "\"ids\": [\"" + maintopic + "\"]," + nl + + "\"identifiers\": [\"" + maintopic + "\"]," + nl + "\"name\": \"" + maintopic + "\"," + nl + - "\"model\": \"Meter Digitizer\"," + nl + - "\"mf\": \"AI on the Edge Device\"," + nl + - "\"sw\": \"" + version + "\"" + nl + - "\"hw\": \"ESP32-CAM\"" + nl + - "\"cu\": \"https://" + *getIPAddress() + "\"" + nl + + "\"model\": \"HomeAssistant Discovery for AI on the Edge Device\"," + nl + + "\"manufacturer\": \"AI on the Edge Device\"," + nl + + "\"sw_version\": \"" + version + "\"" + nl + "}" + nl + "}" + nl;