Browse Source

added checks if light scheduler is not supported

rfm69
wysiwyng 6 years ago
parent
commit
907cad2857
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      code/espurna/scheduler.ino

+ 2
- 0
code/espurna/scheduler.ino View File

@ -125,8 +125,10 @@ void _schCheck() {
if (getSetting("schType", i, "") == "light") {
int sch_brightness = getSetting("schAction", i, -1).toInt();
DEBUG_MSG_P(PSTR("[SCH] Switching light %d to %d\n"), sch_switch, sch_brightness);
#if LIGHT_PROVIDER != LIGHT_PROVIDER_NONE
lightChannel(sch_switch, sch_brightness);
lightUpdate(true, true);
#endif
} else {
int sch_action = getSetting("schAction", i, 0).toInt();
DEBUG_MSG_P(PSTR("[SCH] Switching switch %d to %d\n"), sch_switch, sch_action);


Loading…
Cancel
Save