From 907cad2857d7aff01e49f89145f634870344a381 Mon Sep 17 00:00:00 2001 From: wysiwyng <4764286+wysiwyng@users.noreply.github.com> Date: Fri, 16 Feb 2018 20:25:37 +0100 Subject: [PATCH] added checks if light scheduler is not supported --- code/espurna/scheduler.ino | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/espurna/scheduler.ino b/code/espurna/scheduler.ino index f1718445..0603e048 100644 --- a/code/espurna/scheduler.ino +++ b/code/espurna/scheduler.ino @@ -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);