Allow any parameter of a light profile as an optional parameter (#44079)

* No code duplication for profile application

* Refactor color profile as a dataclass

* Typing

* Make color_x and color_y of a Light profile optional

* Update tests

* Make brightness field of a Light profile optional

* Transition can be of a float type

* Allow fractional transition times in light profiles

Make transition of a float type.
Allow transition to be optional with 5 column CSV files.

* Make pylint happy

* Fix dropped async_mock

* Simplify CSV row schema
This commit is contained in:
Alexei Chetroi 2021-01-13 06:11:20 -05:00 committed by GitHub
parent 10bc05df00
commit ec038bc6ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 271 additions and 90 deletions

View file

@ -20,7 +20,6 @@ def mock_light_profiles():
with patch(
"homeassistant.components.light.Profiles",
SCHEMA=Profiles.SCHEMA,
side_effect=mock_profiles_class,
):
yield data