From 902dc6b69c016d99a7bc530b4b59410ddaf3758e Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Wed, 25 Sep 2019 17:56:03 +0200 Subject: [PATCH] Fix rounding issue when reading Channel value --- sonoff/xdrv_04_light.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonoff/xdrv_04_light.ino b/sonoff/xdrv_04_light.ino index 1e30152f2..c41f1ae0e 100644 --- a/sonoff/xdrv_04_light.ino +++ b/sonoff/xdrv_04_light.ino @@ -2281,7 +2281,7 @@ void CmndChannel(void) light_controller.changeChannels(Light.current_color); coldim = true; } - ResponseCmndIdxNumber(Light.current_color[XdrvMailbox.index -1] * 100 / 255); + ResponseCmndIdxNumber(changeUIntScale(Light.current_color[XdrvMailbox.index -1],0,255,0,100)); if (coldim) { LightPreparePower(); }