Allow any parameter of a light profile as an optional parameter#44079
Merged
balloob merged 11 commits intohome-assistant:devfrom Jan 13, 2021
Merged
Allow any parameter of a light profile as an optional parameter#44079balloob merged 11 commits intohome-assistant:devfrom
balloob merged 11 commits intohome-assistant:devfrom
Conversation
balloob
reviewed
Jan 4, 2021
balloob
approved these changes
Jan 4, 2021
Member
balloob
left a comment
There was a problem hiding this comment.
Looks good! Can be merged when the schema is simplified.
Make transition of a float type. Allow transition to be optional with 5 column CSV files.
226ad9c to
f56b6ab
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Breaking change
No
Proposed change
In one of the issues users wanted to modify the default transition for the lights, but did not want to change the light's color, which was not possible with light profiles. This PR makes two changes:
transitionfield of thelight_profiles.csva float number -- since transition parameter tolight.turn_onservice call is a float number. Mainly for more precise transitions for shorter durationsAnd if we to allow the
color_x, color_ypairs to be optional, then it made sense to allow any parameter of the light profile to be optional.Only parameters which are present in profile are applied.
Maintains backwards compatibility with 4 and 5 column csv files
At least one of the parameters must be present in the profile
Type of change
Example entry for
configuration.yaml:n/a
Example
light_profiles.csv: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: