From 393195873b545c91cac87e64e8fdeca61d7ef504 Mon Sep 17 00:00:00 2001 From: fvanroie Date: Thu, 13 Oct 2022 15:33:04 +0200 Subject: [PATCH] Add hwid to discovery response --- src/mqtt/hasp_mqtt_paho_single.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mqtt/hasp_mqtt_paho_single.cpp b/src/mqtt/hasp_mqtt_paho_single.cpp index 3f43babb..8f8e0bc4 100644 --- a/src/mqtt/hasp_mqtt_paho_single.cpp +++ b/src/mqtt/hasp_mqtt_paho_single.cpp @@ -234,7 +234,7 @@ int mqtt_send_state(const __FlashStringHelper* subtopic, const char* payload) int mqtt_send_discovery(const char* payload, size_t len) { char tmp_topic[128]; - snprintf_P(tmp_topic, sizeof(tmp_topic), PSTR(MQTT_PREFIX "/" MQTT_TOPIC_DISCOVERY)); + snprintf_P(tmp_topic, sizeof(tmp_topic), PSTR(MQTT_PREFIX "/" MQTT_TOPIC_DISCOVERY "/%s"),haspDevice.get_hardware_id()); return mqttPublish(tmp_topic, payload, len, false); }