mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
climate min/max values
This commit is contained in:
@@ -1248,7 +1248,7 @@ void Mqtt::publish_ha_sensor_config(uint8_t type,
|
||||
publish_ha(topic, doc.as<JsonObject>());
|
||||
}
|
||||
|
||||
void Mqtt::publish_ha_climate_config(uint8_t tag, bool has_roomtemp, bool remove) {
|
||||
void Mqtt::publish_ha_climate_config(const uint8_t tag, const bool has_roomtemp, const bool remove, const int16_t min, const uint16_t max) {
|
||||
uint8_t hc_num = tag - DeviceValueTAG::TAG_HC1 + 1;
|
||||
|
||||
char topic[Mqtt::MQTT_TOPIC_MAX_SIZE];
|
||||
@@ -1321,8 +1321,8 @@ void Mqtt::publish_ha_climate_config(uint8_t tag, bool has_roomtemp, bool remove
|
||||
doc["curr_temp_tpl"] = currtemp_s;
|
||||
}
|
||||
|
||||
doc["min_temp"] = Helpers::render_value(min_s, (uint32_t)5, 0, EMSESP::system_.fahrenheit() ? 2 : 0);
|
||||
doc["max_temp"] = Helpers::render_value(max_s, (uint32_t)30, 0, EMSESP::system_.fahrenheit() ? 2 : 0);
|
||||
doc["min_temp"] = Helpers::render_value(min_s, min, 0, EMSESP::system_.fahrenheit() ? 2 : 0);
|
||||
doc["max_temp"] = Helpers::render_value(max_s, max, 0, EMSESP::system_.fahrenheit() ? 2 : 0);
|
||||
doc["temp_step"] = "0.5";
|
||||
|
||||
// the HA climate component only responds to auto, heat and off
|
||||
|
||||
Reference in New Issue
Block a user