Commit graph

232 commits

Author SHA1 Message Date
epenet
dd7bc7971f
Adjust type hints for LightEntityFeature (#82251) 2022-11-17 12:46:42 +01:00
epenet
a91abebea8
Use IntFlag for EntityFeature (#81903) 2022-11-16 12:43:17 +01:00
Erik Montnemery
7b247a79cf
Correct min/max mireds for lights which use K for color temp (#79998) 2022-10-10 16:45:38 +03:00
Erik Montnemery
96a8beb29f
Tweak comment in LightEntity (#79750) 2022-10-06 21:17:24 +02:00
Lars
61deb54ec8
Fix max_color_temp_kelvin (#79738)
fix max_color_temp_kelvin
2022-10-06 19:21:57 +02:00
Erik Montnemery
47d0598e75
Use Kelvin as the preferred color temperature unit (#79591)
* Use Kelvin as the preferred white temperature unit

* Update homekit

* Adjust tests
2022-10-06 12:22:39 +02:00
Marc Mueller
bbf54e6f44
Improve light typing (#78641) 2022-09-17 17:37:39 +02:00
epenet
de7e12eeaf
Enable disallow-any-generics in light (#78499) 2022-09-15 08:47:05 -04:00
epenet
1fcab33653
Improve type hints in light (#78349) 2022-09-14 13:36:20 +02:00
Erik Montnemery
b21f8c9ea8
Remove use of deprecated SUPPORT_* constants from MQTT light (#77828)
* Remove use of deprecated SUPPORT_* constants from MQTT light

* Refactor
2022-09-08 11:21:46 +02:00
Erik Montnemery
60c8d95a77
Remove white_value support from light (#76926) 2022-08-18 08:21:05 -04:00
Erik Montnemery
573e966d74
Migrate hue v1 light to color_mode (#69275)
* Migrate hue v1 light to color_mode

* Fix test

* Correct filter_supported_color_modes + add test

* Use ColorMode enum
2022-04-28 09:49:51 +02:00
epenet
c0d8f94487
Adjust ColorMode type hint in light (#70806)
* Adjust ColorMode type hint in light

* Adjust components
2022-04-27 16:02:23 +02:00
Erik Montnemery
28ba572d9d
Only apply color from light profile if no color specified (#70640) 2022-04-25 07:56:07 -07:00
Franck Nijhof
27bc5e1d74
Add ColorMode enum to light platform (#69223) 2022-04-11 18:18:29 +02:00
Franck Nijhof
ea148a1b8e
Add EntityFeature enum to Light (#69103)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-04-02 20:57:01 -07:00
Marc Mueller
53110f8cb7
Update pylint to 2.13.2 (#68704) 2022-03-27 16:08:24 +02:00
Marc Mueller
911b159281
Cleanup after pylint update (#68657) 2022-03-26 00:34:12 +01:00
Marc Mueller
048d8f9263
Add strict typing to core.py (6) - Implicit reexport (#63345) 2022-01-04 19:51:19 +01:00
epenet
e02f0c34e5
Add init type hints [k-l] (#63188)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-02 16:34:33 +01:00
J. Nick Koston
94ae6ac2b2
Handle color temp to RGBWW conversion (#61473)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-12-16 05:39:33 -06:00
Franck Nijhof
cf371ea8dd
Remove deprecated base entity classes (#61006)
* Remove deprecated base entity classes

* Clean up tests
2021-12-05 13:53:52 +01:00
Marc Mueller
4c68662612
Use assignment expressions 34 (#58823) 2021-10-31 19:01:16 +01:00
Erik Montnemery
72d7817dbf
Update light turn_on schema to coerce colors to tuple before asserting sequence type (#58670)
* Make color_name_to_rgb return a tuple

* Tweak

* Tweak

* Update test

* Tweak test
2021-10-29 15:51:14 +02:00
Erik Montnemery
39867c9b83
Convert RGBW and RGBWW colors in light turn_on calls (#58680) 2021-10-29 15:48:11 +02:00
Marc Mueller
4f8148f9ea
Use assignment expressions 07 (#57787) 2021-10-17 20:24:34 +02:00
Marc Mueller
aa7dc78a1e
Use assignment expressions 11 (#57792) 2021-10-17 20:15:48 +02:00
Brian Egge
889aced3b6
Fix None support_color_modes TypeError (#55497)
* Fix None support_color_modes TypeError 

https://github.com/home-assistant/core/issues/55451

* Update __init__.py
2021-09-01 08:26:09 +02:00
J. Nick Koston
e6e8d7eded
Convert color temperature to visible color in lights (#55219) 2021-08-25 21:56:36 +02:00
Marc Mueller
69e413ac1e
Update pylint to 2.10.1 (#54963)
* Update pylint to 2.10.0

* useless-suppression

* Consider-using-tuple

* Apply suggestions from code review

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Use dict.items()

* Add pylint disable

* Use pylint 2.10.1

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-08-21 10:41:23 +02:00
Marc Mueller
10bfc78365
Fix missing encoding with open() (#53593)
* Fix missing encoding with open()

* Fix tests

* Improve open - frontend
2021-07-28 09:41:45 +02:00
Franck Nijhof
0b44265232
Add description classes to entity components (#53521)
* Add description classes to entity components

* An -> A

* Add StateVacuumEntityDescription
2021-07-27 00:22:21 +02:00
Franck Nijhof
c65d120633
Fix typo in min/max mired(s) entity class attribute (#51921) 2021-06-16 09:58:21 +02:00
Erik Montnemery
87813ea991
Tweak light.valid_supported_color_modes (#51659) 2021-06-09 12:53:08 +02:00
Erik Montnemery
443463e19d
Emulate color_temp for lights which support color or white (#51654)
* Emulate color_temp for lights which support color or white

* Support legacy lights

* Tidy up group.light code

* Improve color_temp to white conversion

* Remove color_temp to white conversion

* Add test

* Tweak deconz test
2021-06-09 11:23:01 +02:00
Erik Montnemery
e560e623e9
Add color_mode white (#51411)
* Add color_mode white

* Include brightness in white parameter

* Reformat

* Improve test coverage
2021-06-06 11:13:18 +02:00
Erik Montnemery
532626b738
Move light helper get_supported_color_modes (#51269) 2021-05-31 09:47:58 +02:00
Erik Montnemery
154c849eac
Filter unsupported parameters from light service calls (#51084)
* Filter unsupported parameters from light service calls

* Silence pylint

* Fix deconz tests

* Fix mqtt tests

* Fix scene tests

* Fix trådfri emulated CT

* Fix mqtt tests
2021-05-26 08:02:59 +02:00
Franck Nijhof
f4289b3fca
Improve supported_color_modes typing in Light (#50969) 2021-05-22 18:48:58 +01:00
Franck Nijhof
cad4ec867b
Define light entity attributes as class variables (#50941) 2021-05-22 09:21:31 -07:00
Maciej Bieniek
e06a2a53c4
Add constructor return type in integrations L-N (#50888)
* Add constructor return type in integrations L-N

* Small fix
2021-05-20 13:06:44 +01:00
Erik Montnemery
960ed13f94
Update light device actions to check supported_color_modes (#50611) 2021-05-14 22:58:37 +02:00
Erik Montnemery
80b05c39cc
Fix light turn_on color conversion (#50251) 2021-05-07 17:08:46 +02:00
karliemeads
2dedf3dd07
Apply default light profile only when light is toggled from off to on (#49376)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-04-29 22:06:09 +02:00
Erik Montnemery
e96cbccc92
Improve color conversion for RGBWW lights (#49807) 2021-04-28 15:46:41 +02:00
Franck Nijhof
7d7b942dfa
Small typing tweaks to Light component (#49718)
* Small typing tweaks to Light component

* Use abc collection
2021-04-28 12:04:59 +02:00
Erik Montnemery
d7247c2ace
Correct conversion of RGB and XY colors to RGBW (#49802) 2021-04-28 10:12:20 +02:00
Erik Montnemery
fdadacd158
Improve color conversion for RGBW lights (#49764) 2021-04-27 20:07:55 +02:00
J. Nick Koston
3fa8ffa731
Enable mccabe complexity checks in flake8 (#49616)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-04-25 12:38:40 +02:00
Erik Montnemery
a5a3c98aff
Make lights supporting rgbw and rgbww accept colors (#49565)
* Allow lights supporting rgbw and rgbww accepting colors

* Tweak, update tests
2021-04-23 09:25:37 +02:00