Browse Source

Merge pull request #701 from wysiwyng/origin/dev

Make switch schedules work again
rfm69
Xose Pérez 6 years ago
committed by GitHub
parent
commit
727c275525
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      code/espurna/scheduler.ino
  2. +2
    -2
      code/html/custom.js

+ 1
- 1
code/espurna/scheduler.ino View File

@ -26,7 +26,7 @@ void _schWebSocketOnSend(JsonObject &root){
scheduler["schEnabled"] = getSetting("schEnabled", i, 1).toInt() == 1; scheduler["schEnabled"] = getSetting("schEnabled", i, 1).toInt() == 1;
scheduler["schSwitch"] = getSetting("schSwitch", i, 0).toInt(); scheduler["schSwitch"] = getSetting("schSwitch", i, 0).toInt();
scheduler["schAction"] = getSetting("schAction", 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["schHour"] = getSetting("schHour", i, 0).toInt();
scheduler["schMinute"] = getSetting("schMinute", i, 0).toInt(); scheduler["schMinute"] = getSetting("schMinute", i, 0).toInt();
scheduler["schWDs"] = getSetting("schWDs", i, ""); scheduler["schWDs"] = getSetting("schWDs", i, "");


+ 2
- 2
code/html/custom.js View File

@ -1349,8 +1349,8 @@ $(function() {
$(".button-add-network").on("click", function() { $(".button-add-network").on("click", function() {
$(".more", addNetwork()).toggle(); $(".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", "input", hasChanged);
$(document).on("change", "select", hasChanged); $(document).on("change", "select", hasChanged);


Loading…
Cancel
Save