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 2bbb90d commit f95e988
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ bool sendHaDiscovery()
haPayLoad += (String) "\"dev_cla\":\"" + haStaticDescriptor[i][3] + "\",";
haPayLoad += haDeviceDescription;
haPayLoad += "}";
sprintf(topBuff, "homeassistant/sensor/%s/%s/config", settings.data.deviceName, haStaticDescriptor[i][0]); // build the topic
sprintf(topBuff, "homeassistant/sensor/%s/%s/config", settings.data.mqttTopic, haStaticDescriptor[i][0]); // build the topic
mqttclient.beginPublish(topBuff, haPayLoad.length(), true);
for (size_t i = 0; i < haPayLoad.length(); i++)
{
Expand Down Expand Up @@ -761,7 +761,7 @@ bool sendHaDiscovery()
haPayLoad += (String) "\"dev_cla\":\"" + haLiveDescriptor[i][3] + "\",";
haPayLoad += haDeviceDescription;
haPayLoad += "}";
sprintf(topBuff, "homeassistant/sensor/%s/%s/config", settings.data.deviceName, haLiveDescriptor[i][0]); // build the topic
sprintf(topBuff, "homeassistant/sensor/%s/%s/config", settings.data.mqttTopic, haLiveDescriptor[i][0]); // build the topic
mqttclient.beginPublish(topBuff, haPayLoad.length(), true);
for (size_t i = 0; i < haPayLoad.length(); i++)
{
Expand Down

0 comments on commit f95e988

Please sign in to comment.