Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yeelight RGB bulb YLDP02YL only support white in homekit #23871

Closed
vitinhosessa opened this issue May 14, 2019 · 17 comments
Closed

Yeelight RGB bulb YLDP02YL only support white in homekit #23871

vitinhosessa opened this issue May 14, 2019 · 17 comments

Comments

@vitinhosessa
Copy link

Home Assistant release with the issue:
0.92.2

Operating environment (Hass.io/Docker/Windows/etc.):
Docker on a VM on Windows 10

Component/platform:
light.yeelight:
https://www.home-assistant.io/components/light.yeelight/

homekit:
https://www.home-assistant.io/components/light.homekit_controller/

Description of problem:
i'm using a Yeelight RGB Bulb model YLDP02YL

The light correctly support rgb color and white temperature in home assistant, but only show as white light in homekit devices like iphone.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

discovery:
  ignore:
    - yeelight

yeelight:    
  devices:
    192.168.0.52:
      name: "Lampada 1 Sala PC"
      transition: 750
      save_on_change: true
      model: color1
  custom_effects:
    - name: 'TE'
      flow_params:
        count: 0
        transitions:
          - RGBTransition: [255, 0, 0, 2000, 100]
          - RGBTransition: [0, 255, 0, 2000, 100]
          - RGBTransition: [0, 0, 255, 2000, 100]
          - SleepTransition: [1000]

homekit:
  auto_start: false
  filter:
    include_entities:
      # Luzes
      - light.lampada_1_sala_pc
      - light.luz_cozinha
      - light.luz_quarto_victor
      - light.luz_quarto_roseli_e_antonio
@rytilahti
Copy link
Member

rytilahti commented May 18, 2019

Potentially related to #19251? Anyway, this is not an issue in the yeelight integration, but in homekit one.

@ghost
Copy link

ghost commented May 18, 2019

Hey there @Jc2k, mind taking a look at this issue as its been labeled with a integration (homekit_controller) you are listed as a codeowner for? Thanks!

This is a automatic comment generated by codeowners-mention to help ensure issues and pull requests are seen by the right people.

@Jc2k
Copy link
Member

Jc2k commented May 18, 2019

Hi I think you mean the homekit integration, not homekit_controller integration.

@vitinhosessa
Copy link
Author

It is strange because when i used the yeelight with the discovery settings, the bulb in homekit had the color option. But when i changed to manual configuration the yeelight bulb in homekit lost the option for changing color and started acting as a normal light.

@ghost
Copy link

ghost commented May 19, 2019

Hey there @cdce8p, mind taking a look at this issue as its been labeled with a integration (homekit) you are listed as a codeowner for? Thanks!

This is a automatic comment generated by codeowners-mention to help ensure issues and pull requests are seen by the right people.

@cdce8p
Copy link
Member

cdce8p commented May 19, 2019

@vitinhosessa Can you try excluding the light via the filter option, restart HA, include the light and restart again? Does that change anything?

@vitinhosessa
Copy link
Author

I excluded filter, and it is the same thing. Acting as a normal bulb on homekit.

I did another test, i excluded the ignore on discovery, and excluded the yeelight manual configuration, and the bulb on homekit acted as a RGB bulb.

Probably the bug is on yeelight manual configuration.

@vitinhosessa
Copy link
Author

vitinhosessa commented May 20, 2019

I found the bug. I removed:

  custom_effects:
    - name: 'TE'
      flow_params:
        count: 0
        transitions:
          - RGBTransition: [255, 0, 0, 2000, 100]
          - RGBTransition: [0, 255, 0, 2000, 100]
          - RGBTransition: [0, 0, 255, 2000, 100]
          - SleepTransition: [1000]

and works as should be. Acting as RGB bulb on homekit. 🎉

@vitinhosessa
Copy link
Author

Thanks to helping me. 😄
Should I close or will be tagged and be directed to solve this bug?

@ghost
Copy link

ghost commented May 20, 2019

Hey there @zewelor, mind taking a look at this issue as its been labeled with a integration (yeelight) you are listed as a codeowner for? Thanks!

This is a automatic comment generated by codeowners-mention to help ensure issues and pull requests are seen by the right people.

@zewelor
Copy link
Contributor

zewelor commented May 21, 2019

Maybe its a bug because all yeelight, when defined by hand, are recognized as white only, before they get properties from the device ( https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/yeelight/light.py#L195
https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/yeelight/light.py#L27
https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/yeelight/light.py#L353
).
This PR should fix it: https://github.com/home-assistant/home-assistant/pull/22547/files. It creates light, after propeties are fetched or if light type if manually declared ( like here ).
I think custom_effects are unrelated, and its some kind of race condition.

@vitinhosessa
Copy link
Author

Thanks @zewelor. When this correction will be release?

@zewelor
Copy link
Contributor

zewelor commented May 21, 2019

Sadly I don't know. It's waiting to be reviewed by someone. Maybe you can try it as custom component to see if it solves this error?

@vitinhosessa
Copy link
Author

Mine is working fine since i removed the custom_effects 😄. I ask just to have some idea.

How do i install this version as a custom_component? I can test if works. I just need the link to download the custom component and what i need to do to make the yeelight configurate with this custom component.

@vitinhosessa
Copy link
Author

vitinhosessa commented May 23, 2019

@zewelor the light is acting again as a white bulb. I'm gonna try to add to custom_components this new yeelight that you said.

Did i need to rename the yeelight folder and in configuration.yaml? or i can use yeelight

@zewelor
Copy link
Contributor

zewelor commented May 28, 2019

Configuration doesn't need any changes. Only create folder custom_components/yeelight , in your configuration directory, and download all files there. After that restart HA and you should see something like this in the logs:

WARNING (MainThread) [homeassistant.loader] You are using a custom integration for yeelight which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.

@rytilahti
Copy link
Member

Fixed with #22547 thanks to @zewelor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants