Btw, I need just put it in custom components and not needed to change any of mentioned yeelight platform or etc im my config? This new yeelight custom component will replace the current yeelight platform, I correct understand? Sorry for that questions, I just don’t used custom components before.
If you didn’t migrate from platform to component, as introduced in 0.91, you need to make following change: https://github.com/home-assistant/home-assistant/pull/21593. After that new code, should work after putting it in custom_components/yeelight and HA restart.
Yes I already migrate from light to yeelight platform. So I need to just put custom in my instance, okay thanks I will do it tomorrow, and share some experience here Thank you.
Great ! Remember to add nightlight_switch_type: light
to config, as ( https://github.com/home-assistant/home-assistant/pull/22936 ). To test moonlight separate light entity.
Yes, I paid attention to it, just light, not moonlight? I’m probably going to do it right now on my second instance. And I’ll check right away.
Ups, I do something wrong, put in c_c yeelight folder with includes, in my yeelight.yaml add nightlight switch under ceiling1 device, but after restart all my yeelight devices is lose.
Invalid config for [yeelight]: [nightlight_switch_type] is an invalid option for [yeelight]. Check: yeelight->yeelight->devices->192.168.0.78->nightlight_switch_type. (See /config/configuration.yaml, line 110). Please check the docs at Yeelight - Home Assistant
nightlight_switch_type: light , needs to be placed one level upper, globally in yeelight, not per device.
It its still not working, please paste yeelight configuration.
I have all my yeelight devices in my include yaml:
my config:
…
yeelight: !include includes/yeelight.yaml
…
Where I need to put ‘nightlight_switch_type: light’ ?
Top level in yeelight.yaml,
devices:
x:
name: "awd"
nightlight_switch_type: light
Sorry, I must wait for 10 hour for the possible of reply, as new user… So edit my current post:
…also not passed the validation.
Add some devices there, or delete devices key and leave only nightlight_switch_type: light
In general, yesterday I did something wrong, and my configuration did not validate with the new parameter. The screenshot I posted a little higher, in my edited post, is relevant.
Its better if you paste yaml content, easier to copy it and change.
Currently you have:
devices:
x:
name: "awd"
model: "awdgafg"
nightlight_switch_type: light
But you should have
devices:
x:
name: "awd"
model: "awdgafg"
nightlight_switch_type: light
“nightlight_switch_type: light” in the same column as device key ( 4 spaces less )
I do this, but cfg is not validate pass. I trying another corrections of keys, but the validation is pass only if I comment this switch.
Are you sure, you are using custom_component, from link ? Check HA logs to confirm custom version of yeelight is being used.
I put this https://github.com/home-assistant/home-assistant/tree/1b7219be75967792e7c46dd324e7f9a461f91621/homeassistant/components/yeelight into custom_component/yeelight/… The folder C_C should be located next to the configuration file?
/…
custom_component/yeelight/
tts/
www/
cfg.yaml
devices.yaml
… .yaml
?
wasted some time before realizing that the problem was the model.
I used ceiling1 as I have a YLXD01YL lamp. using ceiling3 it creates and update the sensor. thank you
@SoulAssassin You are missing “s” in dir name “custom_component” -> “custom_components”
python-yeelight lib update was merged into HA, it fixes nightlight recognition for ceiling1 and 2. It also adds proper color temp handling for ceiling, when you try to setup something out of supported range ( it will be set to min / max supported range ). Useful for flux / circadian light.
Guys I’m already updated my instance to 0.92.1, and my ceiling model 1 and bulb e27 v2 white have a binary sensors for nightlight at my dashboard. I just wanna ask u, ‘nightlight_switch_type: light’ is still work? I just trying to add this into my model1, as I prev try to do, but it’s still didn’t work, not validating, I just trying to add switch to dashboard like 650 yeelight, or another lamps with virtual second switch, it’s possibly to add or not?
@SoulAssassin Its still not merged, You would need to use custom_component ( from the link I’ve posted before ). It still waits for review, to be included into HA official code.