Commit graph

26 commits

Author SHA1 Message Date
epenet
1b23429f41
Add __init__ return type to integrations () 2023-02-07 15:55:14 +01:00
Franck Nijhof
b0cee0bc46
String formatting and max line length - Part 1 ()
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-12-22 10:12:50 +01:00
epenet
2fce301b34
Adjust async_step_reauth in broadlink () 2022-06-29 11:53:35 +02:00
Marc Mueller
a8763d7479
Update pylint to 2.14.1 () 2022-06-07 07:57:41 +02:00
Marc Mueller
53245c6523
Update pylint to 2.13.0 () 2022-03-25 15:14:48 -07:00
epenet
2a1f0cadaa
Use dataclass properties in broadlink discovery ()
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-01 13:58:56 +01:00
epenet
59547289b4
Use DhcpServiceInfo in broadlink ()
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-19 12:29:20 +01:00
Felipe Martins Diel
3f61ff4f96
Make general code quality improvements in the Broadlink integration ()
* Create DEVICE_TYPES constant

* Rename _auth_fetch_firmware() to _get_firmware_version()

* Rename dev_type to device_type

* Use SOURCE_REAUTH from config_entries namespace

* Fix unidiomatic imports
2021-11-01 00:01:11 +01:00
J. Nick Koston
34c84a6bbb
Reduce boilerplate to abort for matching config entries ()
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-05-11 22:00:12 +02:00
Franck Nijhof
d4d0b93d3b
Clean up connection classes in integrations A-C () 2021-04-30 21:01:52 -10:00
Felipe Martins Diel
e98f27ead6
Use broadlink.hello() for direct discovery () 2021-04-19 10:16:03 +02:00
Felipe Martins Diel
6a3832484c
Do not log error messages when discovering Broadlink devices () 2021-04-18 18:12:27 -10:00
Ruslan Sayfutdinov
7a9385d857
Explicitly define all methods in ConfigFlow () 2021-04-17 12:42:31 +02:00
J. Nick Koston
6cf57da89f
Use SOURCE_REAUTH constant for starting reauth flows () 2021-03-31 19:48:32 +02:00
Marc Mueller
2956eb0902
Update pylint to 2.7.3 ()
* Update pylint to 2.7.3

* Add class-const-naming-style

* Remove unused-import message

* Additional cleanup
2021-03-29 18:02:56 -10:00
J. Nick Koston
35a5f110bd
Update mac address in broadlink test to match mocked device ()
* Update mac address in broadlink test to match mocked device

* Update tests/components/broadlink/test_config_flow.py
2021-03-27 20:47:47 +01:00
J. Nick Koston
388815b81a
Add broadlink dhcp discovery () 2021-03-27 08:40:19 -10:00
Felipe Martins Diel
9ca0cd5464
Bump broadlink from 0.16.0 to 0.17.0 () 2021-03-11 21:34:56 -08:00
Franck Nijhof
bc1daf1802
None optional hass typing in FlowHandler ()
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-02-13 13:21:37 +01:00
springstan
d5efb3e3de
Remove temporary variable by only retrieving needed value () 2020-11-29 00:44:25 +01:00
Felipe Martins Diel
48e954e038
Change instructions for unlocking Broadlink devices () 2020-11-10 10:42:59 +01:00
Philip Allgaier
625bbe6238
Cleanup unused loggers (components A-M) () 2020-10-12 16:59:05 +02:00
Felipe Martins Diel
2f4aa35ca6
Bump python-broadlink to 0.15.0 ()
* Rename DeviceOfflineError to NetworkTimeoutError

* Bump python-broadlink to 0.15
2020-09-26 10:46:02 -05:00
Felipe Martins Diel
976d8f7abe
Handle an unsupported device in the Broadlink config flow () 2020-09-18 15:29:26 +02:00
Franck Nijhof
1c2ebdf307
Upgrade black to 20.8b1 () 2020-08-27 13:56:20 +02:00
Felipe Martins Diel
a2c1f08c8c
Implement config flow in the Broadlink integration ()
* 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