Find the entity_id of a yeelight light in manual mode -- or automatic mode doesn't work

Hello people – newbie question here!

I am trying to use my yeelight lamps with home assistant.
Unfortunately I am unable to locate them automatically and the documentation is not of great help :frowning:

If I follow the manual road, then the lights appear in overview, but not on the “Entities” list.
And although from the web interface I can click them on and off, I can’t find out their entity_id and thus can’t use them in any automation.

I have the feeling that I am missing something crucial … can you help ?

You can find the entity_id’s of all entities by going to the configuration menu in the bottom left sidebar and then go to the “states” tab.

Not all integrations will put entities in the “entities” list. Only ones that provide a “unique id”.

But you can always find the entity in the states page along with it’s current state and all of it’s associated attributes…

This is what I have im my configuration.yaml

yeelight:
  devices:
    192.168.1.35:
      name: Bedroom Light

After this, restart HA and the entety_id should appear in States.

Thank you all, didn’t know that.

In my system this was under “Developer Tools” -> “States”
Now I can properly see them.

It looks like the id is the same with their “name”, when changing spaces with underlines etc.

I can see that the entity is light.pc_light, while the name in the configuration is PC light.
Similarly the friendly_name is (obviously) PC light.

Btw is is possible the id name not to be created automatically by it’s name? Or, in other words, to have a “special” friendly_name (i.e. localized), while keeping the entity_id as ASCII (i.e. english) and more simple?

A lot of the entities use the “name” or “alias” to automatically generate entity_id’s but not all. there are a few domains (scripts, all of the “input_xx” domains, etc) you actually specify the entity_id in the config.

And then there are ways to modify the entity_id on some domains. Those are the ones in the entity registry.

As far as changing the friendly name you can do that ion a couple of ways depending on the domain. One is if it is included directly in the entity config. the other way to do it is to create the friendly_name in the “customize:” section of the config.

This was super helpful, thank you. Is there a way to make these into devices so they can be added to scenes?

Not as far as I know. the integration decides what is a “device” or not.

But I’m not sure why you need them to be devices to add them to a scene. You can add the entities to a scene, too.