Commit Graph

40 Commits

Author SHA1 Message Date
Franck Nijhof
8819634b61 String formatting and max line length - Part 6 (#84525) 2022-12-24 13:19:51 +01:00
J. Nick Koston
cd03c49fc2 Wait for config entry platform forwards (#73806) 2022-07-09 17:27:42 +02:00
Franck Nijhof
40d4495ed0 Add update platform to WLED (#68454)
* Add update platform to WLED

* Copy pasta fixes

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/wled/test_update.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Fix tests

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-03-21 15:38:29 +01:00
Franck Nijhof
1c94431efe Handle WLED devices with CCT channels (#64581) 2022-01-21 09:19:50 +01:00
Franck Nijhof
cd9096907b Simplify WLED config flow, use device name for config entry (#63377) 2022-01-04 10:59:14 -08:00
Marvin Wichmann
707fe67c00 Move StrEnum to homeassistant.backports and move Platform to homeassistant.const (#60880)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-12-03 09:31:17 +01:00
Franck Nijhof
c8b0a3b667 Revert "Move Platform StrEnum to const" (#60875) 2021-12-02 14:19:08 -08:00
Franck Nijhof
6e220d5d17 Move Platform StrEnum to const (#60857) 2021-12-02 22:30:52 +01:00
Franck Nijhof
7d3fcfbd30 Add Platform StrEnum to entity_platform (#60818) 2021-12-02 09:07:09 -08:00
Franck Nijhof
d95c615f86 Add binary sensor platform to WLED (#59798) 2021-11-22 13:22:43 +01:00
Franck Nijhof
61e4ebf155 Add button entity platform (restart button) to WLED (#59086)
Co-authored-by: Tom Brien <TomBrien@users.noreply.github.com>
2021-11-10 22:22:52 -08:00
Teemu R
2f346a8048 Add speed & intensity controls to wled (#56862)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-10-26 00:04:19 -07:00
Franck Nijhof
fba7118d44 Add Color Palette Select entities to WLED (#51994)
* Add Color Palette Select entities to WLED

* Update with dev changes, disable by default
2021-06-24 11:25:21 -07:00
Franck Nijhof
a67ca08124 Change dynamic segment handling of WLED (#52018) 2021-06-23 23:43:24 +02:00
Franck Nijhof
cfce71d7df Allow keeping master light in WLED (#51759) 2021-06-12 13:33:23 +02:00
Franck Nijhof
b83b82ca7d WLED WebSocket support - local push updates (#51683)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-06-11 20:55:08 +02:00
Franck Nijhof
332c86ff8c Restructure WLED integration (#51667) 2021-06-09 20:15:46 +02:00
Franck Nijhof
bf13af34b4 Use entity class vars in WLED (#50975) 2021-05-26 14:08:09 +02:00
Michael
9eecd90afc Add constructor return type in integrations T-Z (#50899) 2021-05-20 17:00:19 +02:00
Dermot Duffy
4e4042a869 Fix types for WLED (#50001) 2021-05-09 19:34:21 +02:00
Milan Meulemans
29d72714f3 Replace dict with DeviceInfo (#49950)
* Replace dict with DeviceInfo

* Clean up

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-05-02 00:37:19 +02:00
J. Nick Koston
f9a2c1cfd5 Reduce config entry setup/unload boilerplate V-Z (#49789) 2021-04-27 22:51:11 +02:00
J. Nick Koston
a851bff95a Create async_config_entry_first_refresh to reduce coordinator boilerplate (#48451) 2021-03-29 12:51:39 -10:00
Franck Nijhof
52475c108f Make integration setup optional (#48381) 2021-03-29 13:53:47 -07:00
Marc Mueller
dcca29ef68 Update typing 14 (#48078) 2021-03-18 15:08:35 +01:00
Quentame
198ecb0945 Uniformize platform setup (#47101)
* A platform is not a component

* Fix dynalite

* SUPPORTED_PLATFORMS --> PLATFORMS

* In tests

* In tests 2

* Fix SmartThings

* Fix ZHA test

* Fix Z-Wave

* Revert Z-Wave

* Use PLATFORMS const in ambient_station

* Fix ihc comment
2021-03-02 21:43:59 +01:00
Franck Nijhof
f1d3af1a13 Add WLED unload entry result correctly (#45783) 2021-01-31 07:59:39 -10:00
springstan
ce1ef73366 Update WLED to use CoordinatorEntity (#39442) 2020-08-30 18:05:55 +02:00
Ville Skyttä
b4bac0f7a0 Exception chaining and wrapping improvements (#39320)
* Remove unnecessary exception re-wraps

* Preserve exception chains on re-raise

We slap "from cause" to almost all possible cases here. In some cases it
could conceivably be better to do "from None" if we really want to hide
the cause. However those should be in the minority, and "from cause"
should be an improvement over the corresponding raise without a "from"
in all cases anyway.

The only case where we raise from None here is in plex, where the
exception for an original invalid SSL cert is not the root cause for
failure to validate a newly fetched one.

Follow local convention on exception variable names if there is a
consistent one, otherwise `err` to match with majority of codebase.

* Fix mistaken re-wrap in homematicip_cloud/hap.py

Missed the difference between HmipConnectionError and
HmipcConnectionError.

* Do not hide original error on plex new cert validation error

Original is not the cause for the new one, but showing old in the
traceback is useful nevertheless.
2020-08-28 13:50:32 +02:00
Franck Nijhof
1c2ebdf307 Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
Ville Skyttä
c2a21fa496 Update coordinator improvements (#38366)
* Make generic

* Add type info to bunch of uses

* Recognize requests exceptions

* Recognize urllib exceptions
2020-07-30 18:04:00 +03:00
Franck Nijhof
59f935beb0 Use async_on_remove for WLED DataUpdateCoordinator (#36640) 2020-06-10 16:02:45 -06:00
Franck Nijhof
aece76f6cd Bump wled 0.3.0, reduce calls stability improvements (#32903) 2020-03-17 20:17:59 +01:00
Franck Nijhof
992daa4a44 Migrate WLED to use DataUpdateCoordinator (#32565)
* Migrate WLED to use DataUpdateCoordinator

* Remove stale debug statement

* Process review suggestions

* Improve tests

* Improve tests
2020-03-13 13:19:05 +01:00
Franck Nijhof
db76b91ffa Add disabled entities support to WLED (#31040) 2020-01-22 10:45:38 +01:00
Franck Nijhof
42b86d4b4e Bump wled to 0.2.1 (#30474)
* Bump wled to 0.2.0

* Bump wled to 0.2.1
2020-01-04 22:52:37 +01:00
Franck Nijhof
51db9bdfce Add unique ID to WLED config entries (#30480)
* Add unique ID to WLED config entries

* Improve robustness of the tests
2020-01-04 22:48:31 +01:00
Franck Nijhof
a39cac765e Add sensor platform to WLED integration (#28632)
* Add sensor platform to WLED integration

* Process review comments
2019-11-09 20:18:41 +01:00
Franck Nijhof
b2071b81c1 Add switch platform to WLED integration (#28606)
* Add switch platform to WLED integration

* Use async_schedule_update_ha_state in async context

* Process review comments
2019-11-08 09:48:46 +01:00
Franck Nijhof
78b83c653a Add WLED integration (#28542)
* Add WLED integration

* Use f-string for uniq id in sensor platform

* Typing improvements

* Removes sensor & light platform

* Remove PARALLEL_UPDATES from integration level

* Correct type in code comment 'themselves'

* Use async_track_time_interval in async context

* Remove stale code

* Remove decorator from Flow handler

* Remove unused __init__ from config flow

* Move show form methods to sync

* Only wrap lines that can raise in try except block

* Remove domain and platform from uniq id

* Wrap light state in bool object in is_on method

* Use async_schedule_update_ha_state in async context

* Return empty dict in device state attributes instead of None

* Remove unneeded setdefault call in setup entry

* Cancel update timer on entry unload

* Restructure config flow code

* Adjust tests for new uniq id

* Correct typo AdGuard Home -> WLED in config flow file comment

* Convert internal package imports to be relative

* Reformat JSON files with Prettier

* Improve tests based on review comments

* Add test for zeroconf when no data is provided

* Cleanup and extended tests
2019-11-06 23:55:39 +01:00