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) {
|
void Boiler::device_info(JsonArray & root) {
|
||||||
JsonObject dataElement;
|
JsonObject dataElement;
|
||||||
|
|
||||||
dataElement = root.createNestedObject();
|
if (Helpers::hasValue(tap_water_active_, EMS_VALUE_BOOL)) {
|
||||||
dataElement["name"] = F("Hot tap water");
|
dataElement = root.createNestedObject();
|
||||||
dataElement["value"] = tap_water_active_ ? F("running") : F("off");
|
dataElement["name"] = F("Hot tap water");
|
||||||
|
dataElement["value"] = tap_water_active_ ? F("running") : F("off");
|
||||||
|
}
|
||||||
|
|
||||||
dataElement = root.createNestedObject();
|
if (Helpers::hasValue(heating_active_, EMS_VALUE_BOOL)) {
|
||||||
dataElement["name"] = F("Central heating");
|
dataElement = root.createNestedObject();
|
||||||
dataElement["value"] = heating_active_ ? F("active") : F("off");
|
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("Selected flow temperature"), selFlowTemp_, F_(degrees));
|
||||||
render_value_json(root, "", F("Current flow temperature"), curFlowTemp_, F_(degrees), 10);
|
render_value_json(root, "", F("Current flow temperature"), curFlowTemp_, F_(degrees), 10);
|
||||||
|
|||||||
Reference in New Issue
Block a user