diff --git a/html/js/thermostat.js b/html/js/thermostat.js index d6ce63c..d159e7a 100644 --- a/html/js/thermostat.js +++ b/html/js/thermostat.js @@ -153,13 +153,15 @@ function appendData(data) { "coolminutes": parseFloat(cmIn.val()), "verbose": configData.verbose }]) - }) - window.setInterval(renderThermostats, 60000); + }); + window.clearInterval(rtHandle); + rtHandle = window.setInterval(renderThermostats, 60000); renderThermostats(); }); var noButton = $("").addClass("button").text("✘").click(function() { - window.setInterval(renderThermostats, 60000); + window.clearInterval(rtHandle); + rtHandle = window.setInterval(renderThermostats, 60000); renderThermostats(); });