From 0dd64e39e1f66f534f9dede601deac201afbe865 Mon Sep 17 00:00:00 2001 From: Softwarecrash Date: Sun, 7 Apr 2024 11:56:40 +0200 Subject: [PATCH] correct HA path --- platformio.ini | 2 +- src/main.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/platformio.ini b/platformio.ini index af2e1a2..00dcd09 100644 --- a/platformio.ini +++ b/platformio.ini @@ -18,7 +18,7 @@ monitor_filters = esp8266_exception_decoder, default, time, printable, colorize board_build.ldscript = eagle.flash.4m.ld ; 4MB (FS:4MB OTA:~3600KB) upload_speed = 921600 -custom_prog_version = 1.2.0RC3 +custom_prog_version = 1.2.0 build_flags = -DVERSION=${this.custom_prog_version} diff --git a/src/main.cpp b/src/main.cpp index d88fc96..fbf9f51 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -785,7 +785,7 @@ bool sendHaDiscovery() haPayLoad += (String) "\"dev_cla\":\"" + haDescriptor[i][3] + "\","; haPayLoad += haDeviceDescription; haPayLoad += "}"; - sprintf(topBuff, "homeassistant/sensor/%s/%s/config", _settings.data.deviceName, haDescriptor[i][0]); // build the topic + sprintf(topBuff, "homeassistant/sensor/%s/%s/config", _settings.data.mqttTopic, haDescriptor[i][0]); // build the topic mqttclient.beginPublish(topBuff, haPayLoad.length(), true); for (size_t i = 0; i < haPayLoad.length(); i++) { @@ -812,7 +812,7 @@ bool sendHaDiscovery() haPayLoad += haDeviceDescription; haPayLoad += "}"; - sprintf(topBuff, "homeassistant/switch/%s/%s/config", _settings.data.deviceName, "Remote_Control"); // build the topic + sprintf(topBuff, "homeassistant/switch/%s/%s/config", _settings.data.mqttTopic, "Remote_Control"); // build the topic mqttclient.beginPublish(topBuff, haPayLoad.length(), true); for (size_t i = 0; i < haPayLoad.length(); i++)