Commit graph

28 commits

Author SHA1 Message Date
epenet
be6dc81fc0
Use ColorMode enum in switch (#70537) 2022-04-23 10:26:35 -10:00
Erik Montnemery
cc156c767d
Revert light.switch to 2022.3 (#68772) 2022-03-28 12:28:15 +02:00
Erik Montnemery
cb7e492e81
Add switch_as_x integration (#67878)
* Add switch_as_x integration

* Address review comments

* Add translation strings

* Rename entity_type option to target_domain

* Move LightSwitch class definition to switch_as_x/light.py

* Update manifest

* Move tests
2022-03-10 12:23:01 +01:00
Erik Montnemery
0c12914548
Add config flow for switch.light (#67447)
* Add config flow for switch.light

* Refactor according to code review

* Setup light switch from config entry

* Improve async_resolve_entity

* Prepare for multiple steps

* Remove name and options flow from switch light

* Check type before adding description to schema keys

* Remove options flow enabler

* Copy name from the switch

* Move helper flows to new file

* Improve test coverage

* Fix name

* Remove dead code from abstract method

* Remove manifest 'helper' option

* Validate registry entry id before forwarding to light platform

* Improve test

* Add translations

* Improve config entry setup

* Log when config entry fails setup

* Update homeassistant/components/switch/__init__.py

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-03-04 20:02:17 +01:00
Marc Mueller
ae6d9c229e
Use const imports [l-z] (#63469) 2022-01-05 18:21:20 +01:00
Franck Nijhof
c5d8792c34
Cleanup switch light (#63127) 2021-12-31 12:47:16 +01:00
Franck Nijhof
78442d82d1
Add color mode support to switch light (#63124) 2021-12-31 11:43:59 +01:00
Ruslan Sayfutdinov
786c5db5be
Use AddEntitiesCallback type, pt.4 (#49955) 2021-05-04 14:50:06 +02:00
Marc Mueller
c07646db5d
Update typing syntax (#49480)
* 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 (#48468) 2021-03-29 13:24:56 -10:00
Marc Mueller
a3cd1854f6
Update typing 12 (#48073) 2021-03-18 14:31:38 +01:00
Franck Nijhof
5d5a110a20
None optional hass typing in base entity and notify (#47528) 2021-03-15 15:11:41 +01:00
Paulus Schoutsen
e6a6b2a680
Simplify switch light (#47317) 2021-03-03 10:13:04 -08:00
Philip Allgaier
dde6305549
Cleanup unused loggers (components N-Z + tests) (#41982) 2020-10-16 21:24:08 -05:00
Thibaut
729ed1cab6
Add unique_id to the light switch (#40603)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-09-30 13:05:18 +02:00
J. Nick Koston
20d5d3c162
Switch a few more async_track_state_change to the faster async_track_state_change_event (#37833)
async_track_state_change_event is faster than async_track_state_change
and since we do not care about the data being returned to the callback
this is a simple speedup
2020-07-14 22:31:34 -07:00
Franck Nijhof
f42eb0d5ca
Fix missing service call context in multiple locations (#37094) 2020-06-25 17:09:52 -07:00
Erik Montnemery
e4333a7a44
Rename Light to LightEntity (#34593) 2020-04-26 18:49:41 +02:00
Ville Skyttä
05abf37046
Type hint improvements (#32905)
* Complete helpers.entity_component type hints

* Add discovery info type
2020-03-18 19:27:25 +02:00
Bas Nijholt
e0b82440ad Sort imports according to PEP8 for switch (#29654) 2019-12-08 18:50:17 +01:00
Ville Skyttä
f88ead597a Type hint improvements (#28260)
* 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 (#27913)
* 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ä
54242cd65c Type hint additions (#26765) 2019-09-20 08:23:34 -07:00
Ville Skyttä
33e1b44b3a
Use PEP 526 type annotations, add some type hints (#26464)
* 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
Ville Skyttä
b738082dad Type check various base components (#25878)
* Type check various component base classes, disabling bunch of checks for now

* Type hint fixes

* Help mypy out some

* Add more type hints
2019-08-11 20:38:18 -07:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
Tobias Sauerwein
048b100eea Clean up docstrings (#22679)
* 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 (#22308)
* Consolidate final platforms

* Fix some tests

* Fix more tests

* Fix more tests
2019-03-23 20:22:35 -07:00
Renamed from homeassistant/components/light/switch.py (Browse further)