small fix for random effect in order to use the whole rgb range. So 255 is not excluded anymore. (#7156)

pull/5546/merge
Kevin 2017-04-18 11:46:18 +02:00 committed by Daniel Høyer Iversen
parent 9c0171ec5e
commit 43799b8fee
1 changed files with 3 additions and 3 deletions

View File

@ -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: