fixes suggested by Michael, renamed topic sensors to sensor_data #506

This commit is contained in:
proddy
2020-09-20 19:42:15 +02:00
parent 17e44e1dca
commit 32634755b2
3 changed files with 17 additions and 18 deletions

View File

@@ -442,7 +442,8 @@ bool Thermostat::export_values(uint8_t mqtt_format, JsonObject & rootThermostat)
char s[3];
strlcpy(topic, "thermostat_data", 30);
strlcat(topic, Helpers::itoa(s, hc->hc_num()), 30); // append hc to topic
rootThermostat.clear(); // clear object
Mqtt::publish(topic, rootThermostat);
rootThermostat.clear(); // clear object
} else if (mqtt_format == MQTT_format::HA) {
// see if we have already registered this with HA MQTT Discovery, if not send the config
if (!hc->ha_registered()) {