diff --git a/code/espurna/scheduler.ino b/code/espurna/scheduler.ino index faa89e68..b78f3fc7 100644 --- a/code/espurna/scheduler.ino +++ b/code/espurna/scheduler.ino @@ -26,7 +26,7 @@ void _schWebSocketOnSend(JsonObject &root){ scheduler["schEnabled"] = getSetting("schEnabled", i, 1).toInt() == 1; scheduler["schSwitch"] = getSetting("schSwitch", i, 0).toInt(); scheduler["schAction"] = getSetting("schAction", i, 0).toInt(); - scheduler["schType"] = getSetting("schType", i, 0); + scheduler["schType"] = getSetting("schType", i, 0).toInt(); scheduler["schHour"] = getSetting("schHour", i, 0).toInt(); scheduler["schMinute"] = getSetting("schMinute", i, 0).toInt(); scheduler["schWDs"] = getSetting("schWDs", i, ""); diff --git a/code/html/custom.js b/code/html/custom.js index b2e90172..70181a10 100644 --- a/code/html/custom.js +++ b/code/html/custom.js @@ -1349,8 +1349,8 @@ $(function() { $(".button-add-network").on("click", function() { $(".more", addNetwork()).toggle(); }); - $(".button-add-switch-schedule").on("click", { schType: "1" }, addSchedule); - $(".button-add-light-schedule").on("click", { schType: "2" }, addSchedule); + $(".button-add-switch-schedule").on("click", { schType: 1 }, addSchedule); + $(".button-add-light-schedule").on("click", { schType: 2 }, addSchedule); $(document).on("change", "input", hasChanged); $(document).on("change", "select", hasChanged);