I’ve just installed a couple of Yeelight RGB (YLDP02YL: LED Bulb)
HA dhas discovered the devices . I can only turn them on /of and change the brightness from user interface.
Can I also change lights colour?
I’ve just installed a couple of Yeelight RGB (YLDP02YL: LED Bulb)
HA dhas discovered the devices . I can only turn them on /of and change the brightness from user interface.
Can I also change lights colour?
You should be able to if they are indeed the RGB model. The colour selection only comes up once the light is ON
Ops, You are right; colour selection only occour if light is on.
I just received mine today. I am gonna test it today. will post here if nobody else has it confirmed yet.
EDIT:
I just tested the new bulb and it is working fine with home-assistant.
Hey all
I am using aeotec zwave in wall switches to turn my lights on and off working great. I wanted to add some automations to remove the blue from the lights and make them more yellow as it gets later in the night. I picked up a couple of yeelight colors ones to achieve.
My issue is I still want my wife/ guests to be able to turn on and off the lights using switch in wall, my thoughts are to only apply the transition if lights are on (zwave on)
But say if one light in lounge is off and other is on in kitchen it’s -10pm so it’s already getting more yellow. wife turns on kitchen light it will go to its last state right? I don’t know how to get around it being white.
Also in the morning wife turns on lights and they will be yellow, eg last state.
Anyway to get around this?
Would be awesome if HA could control temp with the bulb off…
EDIT - to achieve this …I added an automation with node read that picks up time and adjust the kelvin for each bulb only if they are on.
How long does it take these bulbs to power on and be discovered? That is, what is the time from flicking the wall switch to the light turning on, and what is the time from flicking the wall switch to a device tracker automation running? (@silvrr @Bieniu)
Depends on the device tracker or other senor used and it’s set interval.
Oh, so you can’t trigger an automation from the advertisement message the bulb sends when it connects to wifi?
What did you want to happen when it is discovered?
My Yeelights typically take 30 seconds to be detected and available in HA but in the app you can configure them to resume last state, come on on or off… What else did you want to happen? HA will automatically know if they are on or off…
I was hoping to have them turn on at low brightness then poll HA for a brightness/temperature when they connect to WiFi (e.g., dim and warm at night, bright and cool during the day) so I can use the existing wall switches. It looks like the bulbs have the right capabilities but HA doesn’t (yet).
Are they not mostly always connected to WiFi??
not if someone turns the light switch off, which I think is what @mje-nz is getting at. The bulbs can be set for ‘resume last state’ but that doesnt help you if they were turned off during the day (when you wanted cool white) and then turned back on at night when you want warm white. I see the use case. not sure if its possible…
Yeah I know that. Sounds like a 4x2 might be effective.
In the yeelight app you can set parameters and make them default then in HA detect when they are connected and set them up as you like
recent testing for me using the White V2 bulbs.
light.toggle will only work with no data attributes set, and will turn on with last set brightness/colour
light.on will work with data attributes and set the light to specified brightness/colour when turned on from and off state, or can also be used to set colour in an on state
I have a lot of yeelight lamps. I can easy change the color and brightness in the web frontend, but now I also want to start to program. So I use the developer tools to call the service
light.turn_on
Parameters containing only one word are fine like:
{
"entity_id": "light.wohnzimmer_stehlampe"
,"color_temp": "300"
}
But when I try to send “arrays” to my lights, I get errors and nothing changes. It looks like my syntax is wrong?
{
"entity_id": "light.wohnzimmer_stehlampe"
,"hs_color": "[300, 70]"
}
2018-09-22 13:55:27 ERROR (MainThread) [homeassistant.core] Invalid service data for light.turn_on: None for dictionary value @ data[‘rgb_color’]. Got ‘[255, 100, 100]’
2018-09-22 13:56:23 ERROR (MainThread) [homeassistant.core] Invalid service data for light.turn_on: None for dictionary value @ data[‘rgb_color’]. Got ‘255, 100, 100’
2018-09-22 13:57:11 ERROR (MainThread) [homeassistant.core] Invalid service data for light.turn_on: None for dictionary value @ data[‘rgb_color’]. Got ‘255,166,87’
2018-09-22 13:57:31 ERROR (MainThread) [homeassistant.core] Invalid service data for light.turn_on: None for dictionary value @ data[‘rgb_color’]. Got ‘[255,166,87]’
2018-09-22 13:58:05 ERROR (MainThread) [homeassistant.core] Invalid service data for light.turn_on: None for dictionary value @ data[‘hs_color’]. Got ‘[300, 70]’
hs_color needs to be a list, not a string, so the correct syntax would be:
{
"entity_id": "light.wohnzimmer_stehlampe",
"hs_color": [300, 70]
}
Thank you! I am still learning. Great community here!
You’re welcome! If you go to “States” under the “Develoment tools”, then click on your light or any other entity, it will build the correct json corresponding to its current state, you’ll never write an incorrect syntax again!