From 016f1f19680e3e114dc5df34b1646a5de26810ad Mon Sep 17 00:00:00 2001 From: BlueAndi Date: Fri, 3 Jan 2025 11:15:32 +0100 Subject: [PATCH] Add origin information to homeassistant MQTT discovery information. --- lib/MqttApiTopicHandler/src/HomeAssistantMqtt.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/MqttApiTopicHandler/src/HomeAssistantMqtt.cpp b/lib/MqttApiTopicHandler/src/HomeAssistantMqtt.cpp index e4b81f41..82ab4a2f 100644 --- a/lib/MqttApiTopicHandler/src/HomeAssistantMqtt.cpp +++ b/lib/MqttApiTopicHandler/src/HomeAssistantMqtt.cpp @@ -367,6 +367,10 @@ void HomeAssistantMqtt::publishAutoDiscoveryInfo(MqttDiscoveryInfo& mqttDiscover jsonDoc["dev"]["sw"] = Version::getSoftwareVersion(); /* HW version is used for the target name (hw_version). */ jsonDoc["dev"]["hw"] = Version::getTargetName(); + /* Origin name */ + jsonDoc["o"]["name"] = "Pixelix"; + /* Origin URL */ + jsonDoc["o"]["url"] = "https://github.com/BlueAndi/Pixelix"; while (discoveryDetailsIt != mqttDiscoveryInfo.discoveryDetails.as().end()) {