Heat switch is only visible id auto heat is off
This commit is contained in:
parent
140eb62927
commit
11fdbc753d
@ -94,13 +94,18 @@ var parse_config = function (event) {
|
|||||||
var config = JSON.parse(event)
|
var config = JSON.parse(event)
|
||||||
var output = "einschalten"
|
var output = "einschalten"
|
||||||
var visibility = 'hidden'
|
var visibility = 'hidden'
|
||||||
|
var visibility_heat = 'visible'
|
||||||
if(config.heat && config.heat.id == '1') {
|
if(config.heat && config.heat.id == '1') {
|
||||||
if(config.heat.autostate) {
|
if(config.heat.autostate) {
|
||||||
output = "ausschalten"
|
output = "ausschalten"
|
||||||
visibility = "visible"
|
visibility = "visible"
|
||||||
|
visibility_heat = "hidden"
|
||||||
document.getElementById("on_temperature").innerHTML = config.heat.on_temperature;
|
document.getElementById("on_temperature").innerHTML = config.heat.on_temperature;
|
||||||
document.getElementById("off_temperature").innerHTML = config.heat.off_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("heat_auto_switch").value = output;
|
||||||
document.getElementById("config_temperatures").style.visibility = visibility
|
document.getElementById("config_temperatures").style.visibility = visibility
|
||||||
}
|
}
|
||||||
|
@ -20,13 +20,16 @@
|
|||||||
<div>
|
<div>
|
||||||
<img src="{{url_for('static', filename='greenhouse_temperature.png')}}"/>
|
<img src="{{url_for('static', filename='greenhouse_temperature.png')}}"/>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
<table class="center">
|
<table class="center">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="table_left">Heizung</td>
|
<td class="table_left" id="heat_switch_label" style="visibility: hidden;">Heizung </td>
|
||||||
<td class="input">
|
<td class="input">
|
||||||
<input id="heat_switch" type="submit" value="" onclick="on_switch_heat()"></input>
|
<input id="heat_switch" style="visibility: hidden;" type="submit" value="" onclick="on_switch_heat()"></input>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table class="center">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="table_left">Frostwächter</td>
|
<td class="table_left">Frostwächter</td>
|
||||||
<td class="input">
|
<td class="input">
|
||||||
@ -34,6 +37,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
<div id="config_temperatures" style="visibility:hidden;">
|
<div id="config_temperatures" style="visibility:hidden;">
|
||||||
<table class="center">
|
<table class="center">
|
||||||
<tr>
|
<tr>
|
||||||
|
Loading…
Reference in New Issue
Block a user