Home Assistant Community

Yeelight led ceiling light compatible with HA

#245

Amazing :slight_smile:
The best would be to create a new light entity for the background light. Because it has all features of a regular yeelight light.
Sorry for the ceiling light 650 you have two entities. One for the main light and one for the rgb background.

Can you also add a way to switch the main light between moonlight mode and normal mode? Maybe an additional switch in the light popup?

1 Like

#246

I’ve done the same for the Xiaomi Eyecare Light in the past. Multiple entities shouldn’t be a problem. A mode switch isn’t possible right now.

2 Likes

#247

Is it possible to adjust brightness in moon mode for yeelight 650?

1 Like

#248

I was thinking about remapping brightness for the lamps with moonlight: 0-10% in HA translates to 0-100% in moonlight mode and 11%-100% maps to 0-100% in “normal mode”. I have a PoC that it’s possible but it needs cleaning up before I can submit it as PR. It’s not too complex so I don’t mind if you reimplement it, I’d need a week or two to finish it up.

0 Likes

#249

I also recently started to looking at more user friendly Moon mode setting, and some more yeelight functionality. I’ve started to think if yeelight couldn’t be platform. Then it could provide switch and sensor. Switch for power mode and sensor to read current power mode, and other properties returned by underlying lib. With lovelace ui magic, it should be possible to make nice cards with yeelight full control, power mode and exact state display / control.

1 Like

#250

Its easy to make switch and sensor via shell_command, but platform would be better

0 Likes

#251

This would be cool.

0 Likes

#252

This is my current mood/normal switch, it works great:

configuration.yaml:

input_select:
  yeelight_mode:
    name: Yeelight mode
    options:
      - "normal"
      - "moonlight"
    icon: mdi:weather-night

automation.yaml:

- alias: Input select triggered Yeelight 2
  hide_entity: true
  trigger:
    platform: state
    entity_id: input_select.yeelight_mode
  condition:
    - condition: state
      entity_id: light.yeelight_lights_2
      state: 'on'  
  action:
    - service: light.yeelight_set_mode
      entity_id:
        - light.yeelight_ceiling_7c49ebb212
        - light.yeelight_ceiling_7c49ebb3a0
        - light.yeelight_ceiling_7c49ebb3a6
      data_template:
        mode: '{{ states.input_select.yeelight_mode.state }}'

In Lovelace I have an entity card and I added:

1 Like

#253

I’ve created PR with yeelight move into component. It also adds daylight / moonlight switch, for each ceiling light discovered / configured. Switch also read current state, so if you change day / moon from app its state will update.

I was thinking if turning off that switch, should also turn off lamp , or return to day light. But then how to turn on day light ? I was thinking maybe better solution would be to add config option, with default turn on power mode. Then normal light switch could always turn on lamp in desired mode ( day mode ) and moon light would be be controlled via switch ( off will turn off lamp, on will turn on moon mode and lamp ) ?

2 Likes

#254

Good job! :slight_smile:

0 Likes

#255

Awesome!

I’d definitely prefer the config option

0 Likes

#256

OMG! Thanks!

0 Likes

#257

Good day!
I have a lamp Yeelight JIAOYUE 650 with color ambient lights


I can turn it on, off, change the brightness and temperature of the color, but can not find how to change the color and brightness color ambient lights.

configuration.yaml:
light:

  • platform: yeelight
    devices:
    192.168.1.163:
    name: Moon
    transition: 1000
    model: ceiling4

scripts:
moon_on:
sequence:
- service: light.turn_on
entity_id:
- light.Moon
data_template:
brightness_pct: 50
kelvin: 3000

Can you help me? How to control brightness and color ambient lights?
Thank you!

0 Likes

#258

I think unfortunately there is no way to change the color of ambient lights in the HA, the main light controlled only. I have been using this kind of lamp for 7 months with HA but if I want to change the ambient light color than I have to use the remote controller.

0 Likes

#259

Look here Yeelight led ceiling light compatible with HA

0 Likes

#260

Looks like new version released.

0 Likes

#261

This means that it will work after the next update Home Assistant?

0 Likes

#262

0.4.4 version rlsed :slight_smile:

0 Likes

#263

There is beta 0.91 released, which contains many fixes and improvements for yeelight. There is shit load of changes fixes refactor, moving it to component etc. It would be great if someone can test it :smiley:

From visible changes:
first its component now, so no more

light:
  - platform: yeelight 

its now

yeelight:

More description with example here in comment: https://github.com/home-assistant/home-assistant/pull/21593

I’ve added ambilight support, which seems to work fine ( at least from my testing ). There is also nightlight mode binary sensor, so no more input boolean to track state. https://github.com/home-assistant/home-assistant/pull/22434 There is also ( not yet merged ). Opt in feature to allow dynamic icon change, depending on the current mode. It would be great to test this also and get some feedback :smiley:

Except of that. I’m wondering how to best integrate nightlight ( moonlight ) mode switch. @syssi suggested to make 2 light, for each ceiling light. One for nightlight mode and one as normal. But then what should be the state of normal light, when nightlight is on ? Also on ? off ?. Maybe some external switch solution, but then how to handle it ? When it should be on when off etc ?

2 Likes

#264

But then what should be the state of normal light, when nightlight is on ? Also on ? off ?

It should be off. And vica versa, moonlight light should be off if the lamp is in normal light mode.

I thought you considered splitting the whole 0%-100% lightness into 0%-9% moonlight and 10%-100% normal light groups, where 9% would set the brightest moonlight and 10% would set the dimmest normal light. Did you?

0 Likes