From 43799b8fee5cf5a8094d65999712049b67a41380 Mon Sep 17 00:00:00 2001 From: Kevin Date: Tue, 18 Apr 2017 11:46:18 +0200 Subject: [PATCH] small fix for random effect in order to use the whole rgb range. So 255 is not excluded anymore. (#7156) --- homeassistant/components/light/flux_led.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/light/flux_led.py b/homeassistant/components/light/flux_led.py index f599d788994..f39ef3881a6 100644 --- a/homeassistant/components/light/flux_led.py +++ b/homeassistant/components/light/flux_led.py @@ -216,9 +216,9 @@ class FluxLight(Light): (red, green, blue) = self._bulb.getRgb() self._bulb.setRgb(red, green, blue, brightness=brightness) elif effect == EFFECT_RANDOM: - self._bulb.setRgb(random.randrange(0, 255), - random.randrange(0, 255), - random.randrange(0, 255)) + self._bulb.setRgb(random.randint(0, 255), + random.randint(0, 255), + random.randint(0, 255)) elif effect == EFFECT_COLORLOOP: self._bulb.setPresetPattern(0x25, 50) elif effect == EFFECT_RED_FADE: