From f23d18723e1cbd469ac95a51d3c1aa910c3377e6 Mon Sep 17 00:00:00 2001 From: Andre Thomas Date: Sat, 26 Jan 2019 16:43:36 +0200 Subject: [PATCH 1/2] Disable sleep 0 for scheme 0 Disable sleep 0 for scheme 0 as there is no animation required --- sonoff/xdrv_04_light.ino | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sonoff/xdrv_04_light.ino b/sonoff/xdrv_04_light.ino index bfeaf889f..ab3450ec2 100644 --- a/sonoff/xdrv_04_light.ino +++ b/sonoff/xdrv_04_light.ino @@ -756,7 +756,11 @@ void LightAnimate(void) } } else { - sleep = 0; + if (Settings.light_scheme > 0) { + sleep = 0; + } else { + sleep = Settings.sleep; + } switch (Settings.light_scheme) { case LS_POWER: LightSetDimmer(Settings.light_dimmer); From 269258bde57a9c226473f7ad7f63df38a171b640 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sun, 27 Jan 2019 11:25:28 +0100 Subject: [PATCH 2/2] Update xdrv_04_light.ino --- sonoff/xdrv_04_light.ino | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sonoff/xdrv_04_light.ino b/sonoff/xdrv_04_light.ino index ab3450ec2..4a1d19478 100644 --- a/sonoff/xdrv_04_light.ino +++ b/sonoff/xdrv_04_light.ino @@ -756,11 +756,7 @@ void LightAnimate(void) } } else { - if (Settings.light_scheme > 0) { - sleep = 0; - } else { - sleep = Settings.sleep; - } + sleep = (LS_POWER == Settings.light_scheme) ? Settings.sleep : 0; // If no animation then use sleep as is switch (Settings.light_scheme) { case LS_POWER: LightSetDimmer(Settings.light_dimmer);