Compare commits
4 Commits
85d8ba58b4
...
20788ca6a9
Author | SHA1 | Date | |
---|---|---|---|
|
20788ca6a9 | ||
|
b0b9783882 | ||
|
11fdbc753d | ||
|
140eb62927 |
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
*.egg-info
|
||||||
|
build
|
@ -94,27 +94,35 @@ 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
|
||||||
}
|
}
|
||||||
output = "einschalten"
|
output = "einschalten"
|
||||||
visibility = 'hidden'
|
visibility = 'hidden'
|
||||||
|
var visibility_water = "visible"
|
||||||
if(config.water && config.water.id == '1') {
|
if(config.water && config.water.id == '1') {
|
||||||
if(config.water.autostate) {
|
if(config.water.autostate) {
|
||||||
output = "ausschalten"
|
output = "ausschalten"
|
||||||
visibility = "visible"
|
visibility = "visible"
|
||||||
|
visibility_water = "hidden"
|
||||||
document.getElementById("water_on_one").value = config.water.times[0].on_time;
|
document.getElementById("water_on_one").value = config.water.times[0].on_time;
|
||||||
document.getElementById("water_off_one").value = config.water.times[0].off_time;
|
document.getElementById("water_off_one").value = config.water.times[0].off_time;
|
||||||
document.getElementById("water_on_two").value = config.water.times[1].on_time;
|
document.getElementById("water_on_two").value = config.water.times[1].on_time;
|
||||||
document.getElementById("water_off_two").value = config.water.times[1].off_time;
|
document.getElementById("water_off_two").value = config.water.times[1].off_time;
|
||||||
}
|
}
|
||||||
|
document.getElementById("water_switch_label").style.visibility = visibility_water
|
||||||
|
document.getElementById("water_switch").style.visibility = visibility_water
|
||||||
document.getElementById("water_auto_switch").value = output;
|
document.getElementById("water_auto_switch").value = output;
|
||||||
document.getElementById("water_times").style.visibility = visibility
|
document.getElementById("water_times").style.visibility = visibility
|
||||||
}
|
}
|
||||||
|
@ -20,11 +20,12 @@
|
|||||||
<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>
|
||||||
<tr>
|
<tr>
|
||||||
@ -34,6 +35,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>
|
||||||
@ -61,9 +63,9 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<table class="center">
|
<table class="center">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="table_left">Bewässerung</td>
|
<td class="table_left" id="water_switch_label" style="visibility: hidden;">Bewässerung</td>
|
||||||
<td class="input">
|
<td class="input">
|
||||||
<input id="water_switch" type="submit" value="" onclick="on_switch_water()"></input>
|
<input id="water_switch" style="visibility: hidden;" type="submit" value="" onclick="on_switch_water()"></input>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
2
setup.py
2
setup.py
@ -6,7 +6,7 @@ from setuptools import setup
|
|||||||
from setuptools.command.install import install
|
from setuptools.command.install import install
|
||||||
|
|
||||||
NAME = 'Greenhouseui'
|
NAME = 'Greenhouseui'
|
||||||
VERSION = '2'
|
VERSION = '3'
|
||||||
AUTHOR = 'Thomas Klaehn'
|
AUTHOR = 'Thomas Klaehn'
|
||||||
EMAIL = 'tkl@blackfinn.de'
|
EMAIL = 'tkl@blackfinn.de'
|
||||||
PACKAGES = ['greenhouseui']
|
PACKAGES = ['greenhouseui']
|
||||||
|
Loading…
Reference in New Issue
Block a user