diff --git a/templates/switches.html b/templates/switches.html index 8bed10c..5254a90 100644 --- a/templates/switches.html +++ b/templates/switches.html @@ -1,4 +1,5 @@ +
@@ -20,7 +21,15 @@ {% if "switch" in v[1] %} {% elif "dimmer" in v[1] %} -   + + {% elif "pushOn" in v[1] %} +
+ +
+ {% elif "pushOff" in v[1] %} +
+ +
{% elif "setpoint" in v[1] %}

@@ -81,6 +90,7 @@ $(document).ready(function() { var updateSetpoints_block_{{count}}=[]; {% for k, v in blockArray[count]["switches"].iteritems() %} + {% if v[2] %} $('#s_title_{{ count }}').html("{{ v[2] }}"); {% endif %} @@ -89,7 +99,11 @@ $(document).ready(function() { changeSwitch(this, {{v[0]}}); }); updateSwitches_block_{{count}}.push("{{v[0]}}"); - {% elif (v[1] == "setpoint") %} + {% elif (v[1] == "pushOn") or (v[1] == "pushOff") %} + $('button[id="push_{{v[0]}}_block_{{count}}"]').click(function() { + changeSwitch(this, {{v[0]}}); + }); + {% elif (v[1] == "setpoint") %} updateSetpoints_block_{{count}}.push("{{v[0]}}"); {% elif (v[1] == "dimmer" or v[1] == "rgb") %} updateDimmers_block_{{count}}.push("{{v[0]}}");