mirror of
https://github.com/home-assistant/core.git
synced 2025-08-02 10:08:23 +00:00
LIFX: Use 3500K as neutral white
This does not really matter because the colorloop uses saturated colors (without much white). Anyway, just copy the 3500K that the LIFX app uses.
This commit is contained in:
parent
81b567b68f
commit
655b82c1e2
@ -31,6 +31,8 @@ ATTR_CHANGE = 'change'
|
||||
WAVEFORM_SINE = 1
|
||||
WAVEFORM_PULSE = 4
|
||||
|
||||
NEUTRAL_WHITE = 3500
|
||||
|
||||
LIFX_EFFECT_SCHEMA = vol.Schema({
|
||||
vol.Optional(ATTR_ENTITY_ID): cv.entity_ids,
|
||||
vol.Optional(ATTR_POWER_ON, default=True): cv.boolean,
|
||||
@ -313,7 +315,7 @@ class LIFXEffectColorloop(LIFXEffect):
|
||||
int(65535/359*lhue),
|
||||
int(random.uniform(0.8, 1.0)*65535),
|
||||
brightness,
|
||||
4000,
|
||||
NEUTRAL_WHITE,
|
||||
]
|
||||
light.device.set_color(hsbk, None, transition)
|
||||
|
||||
@ -325,7 +327,7 @@ class LIFXEffectColorloop(LIFXEffect):
|
||||
|
||||
def from_poweroff_hsbk(self, light, **kwargs):
|
||||
"""Start from a random hue."""
|
||||
return [random.randint(0, 65535), 65535, 0, 4000]
|
||||
return [random.randint(0, 65535), 65535, 0, NEUTRAL_WHITE]
|
||||
|
||||
|
||||
class LIFXEffectStop(LIFXEffect):
|
||||
|
Loading…
x
Reference in New Issue
Block a user