Migrate xiaomi_miio light to color_mode#70998
Conversation
|
This pull request needs to be manually signed off by @home-assistant/core before it can get merged. |
|
Hey there @rytilahti, @syssi, @starkillerOG, @bieniu, mind taking a look at this pull request as it has been labeled with an integration ( |
| return SUPPORT_BRIGHTNESS | SUPPORT_COLOR | SUPPORT_COLOR_TEMP | ||
| def color_mode(self): | ||
| """Return the color mode of the light.""" | ||
| if self.hs_color: |
There was a problem hiding this comment.
This should be the same behavior as without the PR.
I don't think it's really correct though; the light will be stuck in hs mode once a color is set.
Does the miio library offer any way to get the color mode for a PhilipsMoonlight?
There was a problem hiding this comment.
The library does not provide that at the moment and I'm not sure if it can be derived from the data returned by the device. Maybe @syssi knows if that's even possible?
There was a problem hiding this comment.
@rytilahti @syssi If the library offers no way to get the color mode I suggest to merge this PR, it should not result in any changed behavior
There was a problem hiding this comment.
I think this is fine as an (intermediate) solution.
Proposed change
Migrate `xiaomi_miio light to color_mode
Type of change
Additional information
Checklist
black --fast homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all..coveragerc.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: