Skip to content

Commit

Permalink
correct HA path
Browse files Browse the repository at this point in the history
  • Loading branch information
softwarecrash committed Apr 7, 2024
1 parent 78218ab commit 0dd64e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
{
Expand All @@ -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++)
Expand Down

0 comments on commit 0dd64e3

Please sign in to comment.