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 Light Turn on and set Brightness/Color Temp dont work correctly with nightlight devices #56471

Closed
KoltesPunti opened this issue Sep 20, 2021 · 13 comments · Fixed by #56964

Comments

@KoltesPunti
Copy link

KoltesPunti commented Sep 20, 2021

The problem

The Moonlight wasnt the only problem in the new Yeelight integration.
If i set my yeelight on with command:

  • service: light.turn_on
    data:
    brightness: 255
    color_temp: 250

The Lamp starts in moonlight mode (but shows the full brightness in home assistant)!

On 2021.8.x there's no problem and it works well.

What is version of Home Assistant Core has the issue?

2021.9.0-7

What was the last working version of Home Assistant Core?

2021.8.8

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Yeelight

Link to integration documentation on our website

No response

Example YAML snippet

Status at 2021.8.8 (which works fine)

min_mireds: 153
max_mireds: 370
effect_list:
  - Slow Temp
  - Stop
supported_color_modes:
  - color_temp
color_mode: color_temp
brightness: 255
color_temp: 250
flowing: false
music_mode: false
night_light: false
friendly_name: Küche Decke
supported_features: 44


In 2021.9.7 it shows the exact same brightness and color temp but its in Moonlight mode!

Anything in the logs that might be useful for us?

No response

Additional information

This is the second Big Problem in the new Yeelight Change - this new integration change should never be in release Version (only in Beta)!
I cant update cause 3 of my lamps dont work right anymore with the update!

@probot-home-assistant
Copy link

yeelight documentation
yeelight source
(message by IssueLinks)

@probot-home-assistant
Copy link

Hey there @rytilahti, @zewelor, @shenxn, @starkillerOG, mind taking a look at this issue as it has been labeled with an integration (yeelight) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@bdraco
Copy link
Member

bdraco commented Sep 27, 2021

Please post the models of the devices you are having trouble with.

Please enable debug logging for yeelight and homeassistant.components.yeelight and post the logs when the device is showing the unexpected state.

I don't have a device with a moonlight (I've order one #55832 (comment), but it still in transit), can you screenshot what moonlight mode looks like in the app? Do you know if this the same as nightlight mode?

A video would also be helpful.

@KoltesPunti
Copy link
Author

The Devices it concerns are the yeelight ceiling lamps (Jiaoyue 650, 480….) but maybe more (not tested anymore cause in this state i needed to downgrade)!

Moonlight=Nightlight yes!

The State looks the same in both versions but in 2021.9.x the lamp is (for example) in nightlight mode but shows full brightness in home assistant! It doesnt recognize the (brightness and color) commands i send!

The problem is: everytime i update (home assistant) my whole lamps dont work like they should anymore and i need to downgrade again!

@bdraco
Copy link
Member

bdraco commented Sep 27, 2021

Did you check 2021.9.7 which had the nightlight fix?

If its still an issue I'll give it a try once the device I ordered in #55832 (comment) and the voltage converter arrive

@KoltesPunti
Copy link
Author

Sadly yes!
Maybe something wrong with sending brightness and color temp commands? It (home assistant) definitely sends something but its wrong :/

@bdraco bdraco self-assigned this Sep 27, 2021
@bdraco bdraco changed the title Yeelight Light Turn on and set Brightness/Color Temp dont work Yeelight Light Turn on and set Brightness/Color Temp dont work correctly with nightlight devices Sep 27, 2021
@bdraco
Copy link
Member

bdraco commented Sep 27, 2021

logger:
  default: info
  logs:
    homeassistant.components.yeelight: debug
    yeelight: debug

If you get a chance, try turning on debug logging, then:

  1. change the brightness/color temp from Home Assistant and save the log
  2. change the brightness/color temp from app and save the log

We can compare what the app does to what Home Assistant is doing and maybe work out whats going wrong.

I'll do the same once the device I ordered shows up.

@KoltesPunti
Copy link
Author

KoltesPunti commented Sep 29, 2021

Ok so i've logged every situation from 2021.8.8 - 2021.9.7

The 1. file (2021.8.8 ON with Automation.txt) i turned the Lamp on with this automation:
action:

  • data:
    brightness: 255
    color_temp: 250
    entity_id: light.vorhaus_decke
    service: light.turn_on

2021.8.8 ON with Automation.txt

The 2. file (2021.8.8 ON with Yeelight app.txt) i turned the lamp on with the Yeelight App!

2021.8.8 ON with Yeelight app.txt

The 3. file (2021.9.7 ON with Automation (Lamp was before in full brightness).txt) i turned the Lamp on again with the same automation from above and the lamp was in full brightness before i turned it off!

2021.9.7 ON with Automation (Lamp was before in full brightness).txt

The 4. file (2021.9.7 ON with Yeelight app.txt) i turned the lamp on with the Yeelight App!

2021.9.7 ON with Yeelight app.txt

The 5. file (2021.9.7 deactivate with app and power on with moonlight mode on app.txt) i deactivated the Lamp with the Yeelight app and Powered it on into moonlight mode from app!

2021.9.7 deactivate with app and power on with moonlight mode on app.txt

The 6. (and most important) file (2021.9.7 turn off after moonlight on and on with full brightness.txt) i turned it off with an Automation und turned it on with the same Automation as in the first file BUT the Lamp starts again in Moonlight mode

2021.9.7 turn off after moonlight on and on with full brightness.txt

The 7. file (2021.8.8.turn.off.after.moonlight.on.and.on.with.full.brightness.txt) i turned it off with an Automation und turned it on with the same Automation as in the first file and it starts in full brightness (as it should)!

2021.8.8 turn off after moonlight on and on with full brightness.txt

This is only the first (and i hope only) problem i've encountered on 2021.9.x (with yeelight) after the Moonlight/Nightlight Status Problem. I thought the problem occurs because of this but sadly it wasnt.

@bdraco
Copy link
Member

bdraco commented Sep 29, 2021

@KoltesPunti Awesome. I'll dig through these when I get home this weekend and see if I can come up with a fix from the data.

@bdraco
Copy link
Member

bdraco commented Sep 29, 2021

When we don't get the state back, we are requesting an update before the device updates the internal state.

I fixed that in #56795

I don't think it will completely fix this issue though

@bdraco
Copy link
Member

bdraco commented Oct 2, 2021

Thanks for the dumps. I think I've got all 12 of the combinations sorted in #56964

@KoltesPunti
Copy link
Author

@bdraco now everything works fine :) Great work! Thanks!

@bdraco
Copy link
Member

bdraco commented Oct 7, 2021

Great. Thanks for confirming 👍

@github-actions github-actions bot locked and limited conversation to collaborators Nov 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants