mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
supress hot water/heating displaying in web if there are no values
This commit is contained in:
@@ -78,13 +78,17 @@ void Boiler::add_context_menu() {
|
||||
void Boiler::device_info(JsonArray & root) {
|
||||
JsonObject dataElement;
|
||||
|
||||
if (Helpers::hasValue(tap_water_active_, EMS_VALUE_BOOL)) {
|
||||
dataElement = root.createNestedObject();
|
||||
dataElement["name"] = F("Hot tap water");
|
||||
dataElement["value"] = tap_water_active_ ? F("running") : F("off");
|
||||
}
|
||||
|
||||
if (Helpers::hasValue(heating_active_, EMS_VALUE_BOOL)) {
|
||||
dataElement = root.createNestedObject();
|
||||
dataElement["name"] = F("Central heating");
|
||||
dataElement["value"] = heating_active_ ? F("active") : F("off");
|
||||
}
|
||||
|
||||
render_value_json(root, "", F("Selected flow temperature"), selFlowTemp_, F_(degrees));
|
||||
render_value_json(root, "", F("Current flow temperature"), curFlowTemp_, F_(degrees), 10);
|
||||
|
||||
Reference in New Issue
Block a user