How do you get Yeelight(s) to play ball with HA?

I’ve been scouring the internet trying to find a way to get this single bulb to work. I’ve tried all the fixes suggested with no luck and perhaps it’s because I’ve only just started with HA yesterday, I may have some more learning to do.

So my yeelight bulb works with the integration (i.e. it shows up when I look at the Integrations UI). There are no devices or entities and I cannot control it. I’ve seen this issue pop up many times and people have suggested manually adding it, so my config file now looks like:

discovery:
  ignore:
    - yeelight
yeelight: !include yeelight.yaml

My yeelight.yaml file looks like:

devices:
  192.168.1.48:
    name: lamp_name
    model: color4

The bulb has LAN control activated, it has a static IP (as does the Pi). I then ran across this thread on github where the codeowner said:

Yeelights wont be shown there, as currently, integration doesn’t support Config Flow and/or Entity Registry . Which are needed to register entities there. You can probably use service call in automation to set desired state. I think it only won’t be show if you choose device action type.

I’m not 100% sure what this means just yet, but I tried with a simple automation to turn the lights on with:

alias: Yeelight Test
  description: "TEST"
  trigger:
    - platform: sun
      event: sunset
      offset: "45"
  condition: []
  action:
    - service: light.turn_on
      entity_id: light.lamp_name
      data:
        brightness: 60
        rgb_color: [255,0,0]    
        transition: 3
  mode: single

This does not work and I get a “Unable to find service light.turn_on” error in the log. I’m not really sure why I’m getting this error (yet), but I figured while I do that, perhaps the kind folk in this community might save me the headache of going down multiple rabbit holes in the meantime.

More info: Latest firmware on the yeelight bulb, and I’m running Home Assistant 2020.12.1. Not sure if this is a new issue or if it’s just me.

Could really use some assistance!

Thanks!

The place to find entities not managed by the ui is dev tools|states. Is it there?

I’ve checked there before and just rechecked. It is not showing up there.

Edit to add: I’m now getting repeated “Waiting on integrations to complete setup: yeelight” warnings as well :confused:

If you have no light entities at all, then the light.turn_on service will not be available.

Unfortunately, that’s what I was afraid of it being. Makes sense though. I’ve read that yeelight is no longer part of the light platform, so what are my options to get them to work? I’ve also tried homekit.turn_on and even yeelight.turn_on (because, why not) which did not work either.

It is a light entity, but it sounds as if your config is wrong.

Have you tried using discovery? I assume you added them using the yeelight app so you can control with your phone using the yeelight app and you said you enabled LAN mode…

Well they wouldn’t work would they- you don’t have the correct entity.

Try without the model in your config

1 Like

Discovery was the first thing I did try with no luck, I then tried adding them manually and then a few other solutions I found on the forum/reddit/yeelight’s forum, eventually I just tried random things in the Docs just to see if it works (hence the homekit.turn_on, etc).

I simply cannot get the lights to work even though the UI does discover it.

I have tried this as well. Found this today and had a look at the integrations and realized that I somehow don’t have Light. I’m starting to wonder if this might actually be the cause?

If you search issues there are a number of issues with yeelight and 2020.12.1. One even mentions a color4 version. Have fun in the issues rabbit hole.

I was literally just looking through that just now! :smile:. At least I’m not alone. Let’s see what comes out of it all :sweat_smile:

It possibly means that there is nothing wrong with at least one iteration of your config, and that stopping screwing around with it until you are sure that this isn’t a software bug may be the best option!

2 Likes

Precisely what I did (I just left it on discovery) for a few days. This morning, it seems to have resolved itself with no input from myself. I wonder what the issue was.