Commit graph

67 commits

Author SHA1 Message Date
J. Nick Koston
10e669e69e
Fix yeelight name changing to ip address if discovery fails (#60967) 2021-12-04 08:41:58 +01:00
J. Nick Koston
881d35ab17
Split up yeelight code into multiple files (#59990) 2021-11-23 11:56:07 -06:00
J. Nick Koston
faecc90b38
Workaround brightness transition delay from off in older yeelight models (#58774) 2021-10-31 16:11:07 +01:00
J. Nick Koston
4653d0b079
Retry yeelight setup later if first update fails (#58446) 2021-10-27 10:09:45 +02:00
J. Nick Koston
c3c0a52929
Fix overriding the yeelight model if it is not known (#56967) 2021-10-26 21:04:19 +02:00
J. Nick Koston
427f2a085b
Reconnect and retry yeelight commands after previous wifi drop out (#57741) 2021-10-15 09:37:13 -07:00
J. Nick Koston
58362404ea
Simplify yeelight setup to improve reliability (#57500) 2021-10-11 20:30:23 -07:00
J. Nick Koston
a58085639e
Restore yeelight workaround for failing to update state after on/off (#57400) 2021-10-10 00:01:45 -07:00
J. Nick Koston
eba7cad33f
Fix yeelight connection when bulb stops responding to SSDP (#57138) 2021-10-05 13:41:56 -07:00
J. Nick Koston
1aeab65f56
Fix yeelight state when controlled outside of Home Assistant (#56964) 2021-10-03 00:08:31 -07:00
J. Nick Koston
52410ff0d7
Ensure yeelight can be unloaded when device is offline (#56464) 2021-09-26 09:54:43 -07:00
J. Nick Koston
9e2a29dc37
Improve yeelight stability by moving timeout handling to upstream library (#56432) 2021-09-20 12:32:01 -05:00
J. Nick Koston
b6763c7245
Fix yeelight nightlight mode (#56363) 2021-09-17 22:26:25 -07:00
J. Nick Koston
bad6b2f7f5
Standardize yeelight exception handling (#56362) 2021-09-17 22:25:19 -07:00
Steven Looman
73260c5b88
Move parts of ssdp to async_upnp_client (#55540)
* Move parts of ssdp to async_upnp_client

* Fix test for environments with multiple sources

* Fix sonos tests

* More fixes/changes

* More fixes

* Use async_upnp_client==0.21.0

* Pylint/test fixes

* More changes after review

* Fix tests

* Improve testing

* Fix mypy

* Fix yamaha_musiccast tests?

* Changes after review

* Pylint

* Reduce calls to combined_headers

* Update to async_upnp_client==0.21.1

* Update to async_upnp_client==0.21.2

* use as_dict

Co-authored-by: J. Nick Koston <nick@koston.org>
2021-09-11 13:38:16 -10:00
J. Nick Koston
10fa63775d
Ensure yeelights resync state if they are busy on first connect (#55333) 2021-08-27 12:43:53 -05:00
J. Nick Koston
5393a16c44
Set yeelight capabilities from external discovery (#55280) 2021-08-26 19:04:12 -05:00
J. Nick Koston
ae1d2926cf
Fix some yeelights showing wrong state after on/off (#55279) 2021-08-26 13:25:26 -05:00
J. Nick Koston
089dfad78a
Ensure yeelight model is set in the config entry (#55281)
* Ensure yeelight model is set in the config entry

- If the model was not set in the config entry the light could
  be sent commands it could not handle

* update tests

* fix test
2021-08-26 13:02:59 -05:00
J. Nick Koston
b71f2689d7
Make yeelight aware of the network integration (#54854) 2021-08-20 19:09:22 -05:00
J. Nick Koston
3cb7227040
Normalize the display name of yeelight devices (#54883)
Co-authored-by: Teemu R. <tpr@iki.fi>
2021-08-20 14:32:48 -07:00
J. Nick Koston
8103d9ae3c
Add missing id to yeelights that were setup manually (#54855) 2021-08-19 08:46:14 -05:00
J. Nick Koston
e7a0604a40
Make yeelight discovery async (#54711) 2021-08-18 09:36:13 -07:00
Ville Skyttä
939fde0a50
ConfigType and async_setup/setup type hint improvements (#54739) 2021-08-18 13:22:05 +02:00
starkillerOG
a23da30c29
Yeelight local push updates (#51160)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-08-09 13:33:34 -05:00
Daniel Rheinbay
3c452f8c9b
Refactor yeelight integration to use only flows (#51255)
* Refactor light.py to use only flows.py, eliminating transitions.py

* Reformat yeelight source code using black
2021-06-01 09:04:49 +02:00
tkdrob
d1c4d0de49
Use bool annotations for setup entries (#51166) 2021-05-27 17:39:06 +02:00
Michael
9eecd90afc
Add constructor return type in integrations T-Z (#50899) 2021-05-20 17:00:19 +02:00
J. Nick Koston
c037ebb27c
Add discovery to yeelight (#50385) 2021-05-11 19:55:50 -05: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
Paulus Schoutsen
a90d3a051f
prefer total_seconds over seconds (#49505) 2021-04-20 17:41:36 -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
tkdrob
add0d9d3eb
Use core constants for yeelight (#46552) 2021-02-16 09:00:09 -05:00
Xiaonan Shen
e46f1c0a10
Remove yeelight init dispatcher on unloading (#45359) 2021-01-20 15:10:01 -05:00
zewelor
16ddbb95f4
Add yeelight service to enable disable music mode (#44533)
* Add service to enable / disable music mode

* Black reformat

* Update test

* Fix tests

* Revert consts cleanup

* Use entity method as service call

* Use ATTR for service call

* Sort

* Add tests

* Fix isort

* Fix print

* Black
2020-12-30 17:00:28 +01:00
zewelor
e09234ffae
Fix yeelight unavailbility (#44061) 2020-12-10 09:54:10 +01:00
Xiaonan Shen
f23fcfcd9b
Fix yeelight connection issue (#40251)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-10-27 14:47:11 +01:00
Xiaonan Shen
7b3182fa8f
Improve Yeelight code (#39543)
* Rename ipaddr to ip_addr

* Move custom services to entity services

* Remove platform data

* Change service setup to callback

* Rename ip_addr to host

* Use _host inside class
2020-09-02 18:42:12 +02:00
Xiaonan Shen
45a927ffb2
Add config flow to yeelight (#37191) 2020-08-31 16:40:56 +02:00
zewelor
986853d497
Fix nightlight support detection (#36656) 2020-06-11 15:46:00 -07:00
zewelor
8cf354c042
Provide yeelight unique_id using ssdp discovery (#35448)
* Provide yeelight unique_id using ssdp discovery

* Fixes

* Comment fix

* Cleanup initialization logic and add unique id to binary sensor

* Update homeassistant/components/yeelight/__init__.py

Co-authored-by: Teemu R. <tpr@iki.fi>

* Update homeassistant/components/yeelight/__init__.py

Co-authored-by: Teemu R. <tpr@iki.fi>

* Update comment

* Update comment

* Fix wrong model docstring

Co-authored-by: Teemu R. <tpr@iki.fi>
2020-05-14 19:44:32 +02:00
Franck Nijhof
e8a0abd107
String formatting improvements (#33635)
* String formatting improvements

* Found another one
2020-04-04 18:21:14 +02:00
zewelor
ce13fb8d73 Support yeelight color light with nightlight (#30194)
* Support color light with nightlight

* Better nightlight mode support check

* Lint fixes

* Remove brightness control for color light with nightlight mode
2020-01-13 06:03:48 +01:00
zewelor
575eb48feb Show current effect in yeelight device (#28975)
* Show current effect in yeelight device

* Use device_state_attributes instead of state_attributes

* Add early return in set effect

* Make single if elif chain

* Fix if elif

* Fix if elif
2019-12-16 16:23:05 +01:00
Bas Nijholt
3f469eac28 Sort imports according to PEP8 for yeelight (#29755) 2019-12-09 13:10:24 +01:00
zewelor
c847cc20fc Add yeelight nightlight support via separate light entity (#26224)
* Add yeelight nightligh support via separate light entity

* Fix lint too many ancestors

* PR fixes
2019-09-06 14:33:03 -04:00
Franck Nijhof
dae6895a95 Use literal string interpolation in integrations X-Z (f-strings) (#26395) 2019-09-03 21:15:31 +02:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00