mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-09 17:29:50 +03:00
minor cleanup
This commit is contained in:
@@ -227,8 +227,7 @@ bool Boiler::publish_ha_config() {
|
||||
|
||||
char topic[Mqtt::MQTT_TOPIC_MAX_SIZE];
|
||||
snprintf_P(topic, sizeof(topic), PSTR("homeassistant/sensor/%s/boiler/config"), Mqtt::base().c_str());
|
||||
Mqtt::publish_ha(topic,
|
||||
doc.as<JsonObject>()); // publish the config payload with retain flag
|
||||
Mqtt::publish_ha(topic, doc.as<JsonObject>()); // publish the config payload with retain flag
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -448,9 +448,9 @@ bool Thermostat::thermostat_ha_cmd(const char * message, uint8_t hc_num) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// check for mode first
|
||||
// check for mode first, which is a string
|
||||
if (!set_mode(message, hc_num)) {
|
||||
// handle as a numerical temperature value
|
||||
// otherwise handle as a numerical temperature value and set the setpoint temp
|
||||
float f = strtof((char *)message, 0);
|
||||
set_temperature(f, HeatingCircuit::Mode::AUTO, hc_num);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user