From d878a42a62b57c9ee774ab2a63397280e34d0a8c Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Mon, 29 Apr 2019 08:34:43 +0200 Subject: [PATCH] Fixed Color was wrongly changing Dimmer --- sonoff/xdrv_04_light.ino | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sonoff/xdrv_04_light.ino b/sonoff/xdrv_04_light.ino index d54da085c..f9cc47fff 100644 --- a/sonoff/xdrv_04_light.ino +++ b/sonoff/xdrv_04_light.ino @@ -1699,11 +1699,8 @@ bool LightCommand(void) uint8_t old_bri = light_state.getBri(); // change all channels to specified values light_controller.changeChannels(light_entry_color); - if ((CMND_COLOR == command_code) && (1 == XdrvMailbox.index)) { - // If Color(1) then reset brightness to maximum; - light_controller.changeBri(255); - } else { - // else set back initial brightness + if (2 == XdrvMailbox.index) { + // If Color2, set back old brightness light_controller.changeBri(old_bri); }