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
Provide an individual color temperature range per Yeelight model #14083
Conversation
@@ -195,6 +206,15 @@ def __init__(self, device, config): | |||
self._is_on = None | |||
self._hs = None | |||
|
|||
self._model = config['model'] | |||
self._min_mireds = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe move the kelvin_to_mired(YEELIGHT_SPECS['color1']['max_kelvin'])
defaults from def min_mireds
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could move it to the update call. The capabilities of the device are determined at runtime unfortunately.
Thanks for tackling this! This has been annoying me for a while… However, I get the feeling that the model-to-temperature-range mapping is hardware-level information and should therefore probably go into the upstream yeelight package? Basically, wouldn't it be the cleanest solution if the yeelight package would offer a |
I agree that this should go into python-yeelight, even when it has currently no clear concept of "models". Maybe that's something to discuss with @skorokithakis, if he'd accept it as it is or if we should find a better solution. The problem I see on the end of python-yeelight is that the model information is only given over mdns/discovery & there is no way to query that from a connected bulb via the API. |
Yes, this seems reasonable. It would be good to have this in Either way, we may need to implement some capability-reporting functionality. We can discuss in an issue or PR. |
Hey, just did a PR (home-assistant/home-assistant.io#5338) on the docs to add the model number of the gen 2 yeelight bulb. I then noticed your edit. Should I PR to your edited branch instead? btw, mdns name of the bulb is |
I will try to port the feature to python-yeelight. @louis-lau I merged your PR and updated mine. ;-) |
Description:
Related issue (if applicable): fixes #13785
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#5253
Example entry for
configuration.yaml
(if applicable):