From 11fdbc753d4874c468914dfdb4a98ba01c6255ad Mon Sep 17 00:00:00 2001 From: Thomas Klaehn Date: Wed, 30 Mar 2022 15:27:58 +0200 Subject: [PATCH] Heat switch is only visible id auto heat is off --- greenhouseui/static/scripts/greenhouse.js | 5 ++++ greenhouseui/templates/index.html | 32 +++++++++++++---------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/greenhouseui/static/scripts/greenhouse.js b/greenhouseui/static/scripts/greenhouse.js index f958ae7..ae1b8f2 100644 --- a/greenhouseui/static/scripts/greenhouse.js +++ b/greenhouseui/static/scripts/greenhouse.js @@ -94,13 +94,18 @@ var parse_config = function (event) { var config = JSON.parse(event) var output = "einschalten" var visibility = 'hidden' + var visibility_heat = 'visible' if(config.heat && config.heat.id == '1') { if(config.heat.autostate) { output = "ausschalten" visibility = "visible" + visibility_heat = "hidden" document.getElementById("on_temperature").innerHTML = config.heat.on_temperature; document.getElementById("off_temperature").innerHTML = config.heat.off_temperature; } + document.getElementById("heat_switch_label").style.visibility = visibility_heat + document.getElementById("heat_switch").style.visibility = visibility_heat + document.getElementById("heat_auto_switch").value = output; document.getElementById("config_temperatures").style.visibility = visibility } diff --git a/greenhouseui/templates/index.html b/greenhouseui/templates/index.html index 23d77ee..82f76c9 100644 --- a/greenhouseui/templates/index.html +++ b/greenhouseui/templates/index.html @@ -20,20 +20,24 @@
- - - - - - - - - -
Heizung - -
Frostwächter - -
+
+ + + + + +
+ +
+ + + + + +
Frostwächter + +
+