-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
Add color_mode support to MQTT JSON light #47993
Add color_mode support to MQTT JSON light #47993
Conversation
@Koenkk Can you please help to review this change? |
Looks good, no comments from my side. |
@Koenkk Are you OK with the non-symmetric way For example, the light will get this command: {"state": "ON", "color": {"h": 359.0, "s": 78.0}, "brightness": 75} To which the expected state update from the light is: {"state": "ON", "color_mode": "hs", "color": {"h": 359.0, "s": 78.0}, "brightness": 75} This means the light may include some additional data, such as |
@emontnemery yes! |
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.
This looks really great!
Only docs are missing
Breaking change
MQTT JSON light now supports
color_mode
which should be used together withsupported_color_modes
to signal the light's features.Feature flags
color_temp
,hs
,rgb
,white_value
,xy
are all deprecated and support will be removed in 2021.10.Proposed change
Add
color_mode
support to MQTT JSON light.color_mode
will not be sent to the light on the command topic, the light can unambiguously deduce the desired color made based on which values are present in thecolor
dict or ifcolor_temp
is present.The light must report a supported
color_mode
in it's state update if the state update includes acolor
dict or ifcolor_temp
is present.Type of change
Example entry for
configuration.yaml
: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: