I’m having problems setting up a colour Yeelight (model YLDP06YL)
I’ve copied and pasted the recommended lines for Automatic Detection into the configuration.yaml file:
light.yeelight_color2_XXXXXXXXXXXX:
friendly_name: Living Room
But get the following error:
“Setup failed for light.yeelight_color2_XXXXXXXXXXXX: Integration not found.”
Additionally, I get an entry on the Lovelace ‘Living Room’ card, but instead of showing a light switch I get ‘Home’.
I was hoping to get a switch and also sliders to change the brightness and colour!
I’ve no idea where to look now - and a web search shows that several people have had problems in setting up this light but their solutions have not helped me. I could do with some advice, please!
Jim
That section isn’t for adding the lights to home assistant, it’s for customizing the friendly name (and other attributes if you want) after the lights have been discovered automatically. I can see how the wording related to that in the yeelight docs might be confusing though. That part is also supposed to go in customize.yaml, not configuration.yaml (as the docs state).
Check for the lights at developer tools > states and use the entity IDs you see there if you want to customize the friendly names for them. If the lights aren’t discovered automatically, you’ll need to configure them manually.
Both of you should also format your YAML properly whenever posting here by putting three backticks (```) above and below the sections of YAML.
The name is from that shown by the router, and the same as that displayed in the Overview:
“yeelink-light-color2_miio134099964”
The thing that confounds me is that it’s shown up in States as the entity:
“device_tracker.yeelink_light_color2_miio134099964” and it’s state is sometimes “Home” and sometimes “Away”. How can a light bulb be a tracker and either home or away?!
Do you mean the ‘Configuration Check’ addon? If so, it’s got a big green circle with a tick in it.
Also when I use the file editor, there’s a red circle with a cross if the syntax is wrong, which changes to a green tick if it’s correct. You can’t save and exit the editor without this green tick.
I’ve tried directly copying and pasting the example on the Yeelight page and only modifying the IP address and name, and it doesn’t make any difference. This is the setting I have now:
discovery:
ignore:
- yeelight
yeelight:
devices:
192.168.1.47:
name: Test
Which doesn’t work!
Thanks for sticking with me, ‘Tediore’.
Jim
The next thing I’d like to do is use it in an automation, but it looks like I can’t because it doesn’t have an I.D. as far as I can see - I can’t select it as a device in the automations U.I.
What do you want to do with it? If you want to turn it on/off, select “call service” as the action and use light.turn_on or light.turn_off with the light’s entity ID.
You can use any entity in an automation. Some integrations don’t support the concept of Devices, so you just can’t use the newer Device automations with those.
Ultimately I want to control the light with a motion sensor - but I suspect that that’ll be a whole new can of worms!
(My main problem with HA is that I’m ‘winging it’. I really ought to spend time looking for tutorials. My other problem is that I’m 80 years old and not so mentally receptive to new concepts!)
- alias: 'LIGHT: turn on the master-walk-in light when dark and movement'
initial_state: true
trigger:
platform: state
entity_id: binary_sensor.motion_sensor_158d0002b441a6
to: 'on'
condition:
condition: numeric_state
entity_id: sensor.illumination_158d0002b441a6
below: '25'
action:
service: homeassistant.turn_on
entity_id: switch.0720009584f3eb85017d