Commit Graph

14 Commits (a2730fb29d430a22d3059bf68a6bc13fdb2ccf8b)

Author SHA1 Message Date
Ville Skyttä ced67e5800
Import `util.dt` as `dt_util` in `components/[a-d]*` (#93756) 2023-05-30 00:02:06 +03:00
Marc Mueller 1cc8feabb7
Remove unnecessary try-else (1) (#86158) 2023-01-18 14:24:52 +01:00
Mathew Verdouw 48e3f9584b
Add broadlink lb2 support (#63530)
* Update const.py

* Update to support LB2 version smart bulbs in Broadlink integration

* Update const.py

Added Space.

* Update updater.py

Updated so that LB2 lights use the LB1 update manager.
2022-02-18 21:39:29 +01:00
L-I-Am 3727fb5288
Broadlink Integration add support for LB1 (#50953)
Co-authored-by: Felipe Martins Diel <41558831+felipediel@users.noreply.github.com>
2021-10-26 21:20:11 -05:00
Felipe Martins Diel a7ef3ec947
Fix RM pro temperature sensor (#50098) 2021-05-07 14:47:51 +02:00
Felipe Martins Diel 9ca0cd5464
Bump broadlink from 0.16.0 to 0.17.0 (#47779) 2021-03-11 21:34:56 -08:00
b4dpxl bb31de1de7
Add support for Broadlink BG1 devices (#42314)
* Support for BG1 switches after config flow updates to core Broadlink component

* updates based on @felipediel feedback

* Update updater.py

* Update switch.py

* Update switch.py
2020-11-14 14:59:41 +01:00
Felipe Martins Diel 2b83af856f
Set an appropriate SCAN_INTERVAL for Broadlink A1 sensor (#41309) 2020-11-10 10:02:37 +01:00
Felipe Martins Diel e5fe0c40ec
Add support for Broadlink SP4 series and the latest SP mini 3 devices (#41522)
* Add support for Broadlink SP4 series

* Bump python-broadlink to 0.16

* Fix stale docstring
2020-11-08 11:19:28 -06:00
Felipe Martins Diel 34416fcad3
Log device info in Broadlink error messages (#41307) 2020-10-06 08:02:14 -04:00
Felipe Martins Diel 2f4aa35ca6
Bump python-broadlink to 0.15.0 (#39228)
* Rename DeviceOfflineError to NetworkTimeoutError

* Bump python-broadlink to 0.15
2020-09-26 10:46:02 -05:00
Felipe Martins Diel 2f7b6bfa2d
Fix RM mini 3 update manager (#40215) 2020-09-18 15:31:25 +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
Felipe Martins Diel a2c1f08c8c
Implement config flow in the Broadlink integration (#36914)
* Implement config flow in the Broadlink integration

* General improvements to the Broadlink config flow

* Remove unnecessary else after return

* Fix translations

* Rename device to device_entry

* Add tests for the config flow

* Improve docstrings

* Test we do not accept more than one config entry per device

* Improve helpers

* Allow empty packets

* Allow multiple config files for switches related to the same device

* Rename mock_device to mock_api

* General improvements

* Make new attempts before marking the device as unavailable

* Let the name be the template for the entity_id

* Handle OSError

* Test network unavailable in the configuration flow

* Rename lock attribute

* Update manifest.json

* Import devices from platforms

* Test import flow

* Add deprecation warnings

* General improvements

* Rename deprecate to discontinue

* Test device setup

* Add type attribute to mock api

* Test we handle an update failure at startup

* Remove BroadlinkDevice from tests

* Remove device.py from .coveragerc

* Add tests for the config flow

* Add tests for the device

* Test device registry and update listener

* Test MAC address validation

* Add tests for the device

* Extract domains and types to a helper function

* Do not patch integration details

* Add tests for the device

* Set device classes where appropriate

* Set an appropriate connection class

* Do not set device class for custom switches

* Fix tests and improve code readability

* Use RM4 to test authentication errors

* Handle BroadlinkException in the authentication
2020-08-20 17:30:41 +02:00