Commit Graph

38 Commits (b52a8ba37a5e5e05b80beddff06b116371941d86)

Author SHA1 Message Date
Marc Mueller 4e2cd1bec0
Update typing (2) [a-i] () 2022-01-11 21:23:26 +01:00
Erik Montnemery 8bf8709d99
Simplify groups ()
* Simplify group

* Rename async_update to async_update_group_state and mark it as callback

* Simplify _async_start
2022-01-07 08:58:45 +01:00
Marc Mueller 246338f93d
Use const imports [g-i] () 2022-01-05 17:08:00 +01:00
Erik Montnemery 72d7817dbf
Update light turn_on schema to coerce colors to tuple before asserting sequence type ()
* Make color_name_to_rgb return a tuple

* Tweak

* Tweak

* Update test

* Tweak test
2021-10-29 15:51:14 +02:00
Erik Montnemery 20d8c4da90
Report average of position and tilt_position for cover groups () 2021-08-25 16:12:29 +02:00
Erik Montnemery ee3e27c82a
Add support for white to light groups () 2021-08-23 18:29:44 +02:00
Samuel Tardieu 71b8409c0d
Use a static collection of forwarded attributes ()
Not repeating each attribute name three times lowers the risk of a typo.
Also, only one lookup is done during the kwargs traversal instead of two.
2021-08-20 14:24:16 -07:00
Franck Nijhof b4a50f5459
Add unique ID support to light, cover and media player groups () 2021-07-20 13:56:23 +02:00
Franck Nijhof 4655e3aa08
Clean up light group () 2021-06-16 14:30:25 +02:00
Erik Montnemery 443463e19d
Emulate color_temp for lights which support color or white ()
* 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 d2804433d3
Select onoff and brightness color modes last for light groups () 2021-05-25 08:49:24 -07:00
Franck Nijhof 7221b1e09d
Sort effect lists in light groups () 2021-05-14 21:43:43 -07:00
Erik Montnemery c2663d61d7
Add color_mode support to group light ()
* Add color_mode support to group light

* Lint

* Update tests
2021-05-06 22:34:51 -07:00
Marc Mueller c07646db5d
Update typing syntax ()
* Update typing syntax

* Replace typing imports with ones from collections where possible

* Changes after review
2021-04-20 17:40:41 +02:00
Franck Nijhof c1d5638739
Remove HomeAssistantType alias from entity components - Part 2 () 2021-03-29 13:24:56 -10:00
Marc Mueller 9e1a6610dc
Update typing 07 () 2021-03-18 08:02:55 +01:00
Franck Nijhof 5d5a110a20
None optional hass typing in base entity and notify () 2021-03-15 15:11:41 +01:00
Erik Montnemery af4d06b12e
Update integrations f-i to override extra_state_attributes() () 2021-03-11 16:57:47 +01:00
Shay Levy 215ab5fd40
Add type hints to LightEntity () 2021-03-08 21:21:45 +01:00
Yuval Aboulafia 6c3362217e
Add light group icon () 2020-10-20 13:54:43 +02:00
Philip Allgaier 625bbe6238
Cleanup unused loggers (components A-M) () 2020-10-12 16:59:05 +02:00
J. Nick Koston 3880ac0b0d
Ensure group state is recalculated when re-adding on reload () 2020-09-23 20:55:32 +02:00
J. Nick Koston 63ebea1706
Ensure the context is passed to group changes () 2020-08-26 00:22:10 +02:00
J. Nick Koston b12566e265
Switch async_track_state_change to the faster async_track_state_change_event ()
async_track_state_change_event is faster than async_track_state_change
2020-07-14 22:30:47 -07:00
Franck Nijhof f42eb0d5ca
Fix missing service call context in multiple locations () 2020-06-25 17:09:52 -07:00
Thomas Lovén bdc098645b
Add entity list to light and cover group attributes ()
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-06-05 21:23:52 -07:00
Ville Skyttä 435a88636a
Address new issues flagged by flake8 3.8.0a2 () 2020-04-30 21:37:58 +02:00
Erik Montnemery e4333a7a44
Rename Light to LightEntity () 2020-04-26 18:49:41 +02:00
Ville Skyttä 5216477353
Be consistent with Home Assistant and Hass.io spelling ()
* Be consistent with Home Assistant spelling

* Be consistent with Hass.io spelling
2020-01-05 14:09:17 +02:00
springstan ed5cdb528c Move imports to top for group ()
* Move imports to top for group

* Fix failing test for group
2019-12-05 13:44:11 +01:00
Ville Skyttä f88ead597a Type hint improvements ()
* Add and improve core and config_entries type hints

* Complete and improve config_entries type hints

* More entity registry type hints

* Complete helpers.event type hints
2019-10-28 13:36:26 -07:00
Ville Skyttä 381d423fec Upgrade mypy to 0.740 ()
* Upgrade mypy to 0.740

http://mypy-lang.blogspot.com/2019/10/mypy-0740-released.html

* Type hint additions

* Type fixes

* Remove no longer needed type ignores and casts

* Disable untyped definition checks in bunch of files
2019-10-19 11:35:57 -07:00
Ville Skyttä f259ff17d5
Type hint additions ()
* Type hint additions

* Remove optional from sidebar_icon comment

Co-Authored-By: Franck Nijhof <frenck@frenck.nl>

* Remove optional from sidebar_title comment

Co-Authored-By: Franck Nijhof <frenck@frenck.nl>

* Fix issues after rebase and mypy 0.730
2019-09-29 20:07:49 +03:00
Bryan York f45f8f2f3d Emulate color temperature for non-ct lights in light groups ()
* Emulate color temperature for non-ct lights in light groups

* fix tests

* Address review comments

* Fix black formatting

* Fix for pylint

* Address comments

* Fix black formatting

* Address comments
2019-09-15 20:53:05 +02:00
Ville Skyttä 33e1b44b3a
Use PEP 526 type annotations, add some type hints ()
* Add some more type hints to helpers.event

* Change most type comments to variable types

* Remove some superfluous type hints
2019-09-07 09:48:58 +03:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Tobias Sauerwein 048b100eea Clean up docstrings ()
* Clean up docstrings

* Fix long lines

* Fix more docstrings

* Fix more docstrings

* Fix more docstrings
2019-04-03 17:40:03 +02:00
Paulus Schoutsen 1ddc249989
Consolidate more platforms ()
* Consolidate final platforms

* Fix some tests

* Fix more tests

* Fix more tests
2019-03-23 20:22:35 -07:00