Merge branch 'dev' into dev

This commit is contained in:
Proddy
2020-10-25 18:38:30 +01:00
committed by GitHub
16 changed files with 62 additions and 105 deletions

View File

@@ -137,9 +137,9 @@ void Mixer::publish_values(JsonObject & json, bool force) {
if (export_values_format(Mqtt::mqtt_format(), json)) {
char topic[30];
if (type() == Type::HC) {
snprintf_P(topic, 30, PSTR("mixer_data_hc%d"),hc_);
snprintf_P(topic, 30, PSTR("mixer_data_hc%d"), hc_);
} else {
snprintf_P(topic, 30, PSTR("mixer_data_wwc%d"),hc_);
snprintf_P(topic, 30, PSTR("mixer_data_wwc%d"), hc_);
}
Mqtt::publish(topic, doc.as<JsonObject>());
}

View File

@@ -615,7 +615,7 @@ bool Thermostat::export_values_hc(uint8_t mqtt_format, JsonObject & rootThermost
// the topic will have the hc number appended
if (mqtt_format == Mqtt::Format::SINGLE) {
char topic[30];
snprintf_P(topic, 30, PSTR("thermostat_data_hc%d"),hc->hc_num());
snprintf_P(topic, 30, PSTR("thermostat_data_hc%d"), hc->hc_num());
Mqtt::publish(topic, rootThermostat);
rootThermostat.clear(); // clear object
}