Skip to content

Commit 0dd64e3

Browse files
committed
correct HA path
1 parent 78218ab commit 0dd64e3

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

platformio.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ monitor_filters = esp8266_exception_decoder, default, time, printable, colorize
1818
board_build.ldscript = eagle.flash.4m.ld ; 4MB (FS:4MB OTA:~3600KB)
1919
upload_speed = 921600
2020

21-
custom_prog_version = 1.2.0RC3
21+
custom_prog_version = 1.2.0
2222

2323
build_flags =
2424
-DVERSION=${this.custom_prog_version}

src/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ bool sendHaDiscovery()
785785
haPayLoad += (String) "\"dev_cla\":\"" + haDescriptor[i][3] + "\",";
786786
haPayLoad += haDeviceDescription;
787787
haPayLoad += "}";
788-
sprintf(topBuff, "homeassistant/sensor/%s/%s/config", _settings.data.deviceName, haDescriptor[i][0]); // build the topic
788+
sprintf(topBuff, "homeassistant/sensor/%s/%s/config", _settings.data.mqttTopic, haDescriptor[i][0]); // build the topic
789789
mqttclient.beginPublish(topBuff, haPayLoad.length(), true);
790790
for (size_t i = 0; i < haPayLoad.length(); i++)
791791
{
@@ -812,7 +812,7 @@ bool sendHaDiscovery()
812812

813813
haPayLoad += haDeviceDescription;
814814
haPayLoad += "}";
815-
sprintf(topBuff, "homeassistant/switch/%s/%s/config", _settings.data.deviceName, "Remote_Control"); // build the topic
815+
sprintf(topBuff, "homeassistant/switch/%s/%s/config", _settings.data.mqttTopic, "Remote_Control"); // build the topic
816816

817817
mqttclient.beginPublish(topBuff, haPayLoad.length(), true);
818818
for (size_t i = 0; i < haPayLoad.length(); i++)

0 commit comments

Comments
 (0)