Commit Graph

15 Commits (c900e3030b81ed25859911c3c3100713b24cf52b)

Author SHA1 Message Date
Philip Allgaier 625bbe6238
Cleanup unused loggers (components A-M) (#41600) 2020-10-12 16:59:05 +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
Felipe Martins Diel 38bb8ef4d2
Clean up command learning in the Broadlink integration (#36318) 2020-06-09 14:15:46 +02:00
Felipe Martins Diel 3d253fa52a
Handle StorageError in the Broadlink integration (#35986) 2020-05-23 11:10:06 +02:00
Felipe Martins Diel 2b38df2766
Allow underscores in broadlink hostnames (#35791)
* Allow underscores in hostnames

* Ignore case
2020-05-19 13:46:12 +02:00
Felipe Martins Diel 6464c94990
Fix connection problems in the Broadlink integration (#34670)
* Use helper functions for exception handling

* Create a separate class to handle communication with the device

* Update manifest

* Use coroutine for service setup

* Fix sensor update

* Update tests

* Fix MP1 switch

* Add device.py to .coveragerc

* Remove unnecessary blocking from test_learn_timeout

* Change access method for entries with default values

* Make the changes suggested by MartinHjelmare

* Remove dot from debug message

* Use underscore for unused variable
2020-05-13 10:36:32 +02:00
Bruno Furtado 9f58e5d6ea
Only auth on enter_learning in response to errors for broadlink (#27341)
* Only auth on enter_learning in response to errors.

* Remove extra newline.

* Add missing break on successful attempt.

* Avoid logging success message when auth is unsuccessful.
2020-02-08 16:17:40 -08:00
Paulus Schoutsen e9e44dbd97
Fix callback and async (#31281)
* Fix callback and async

* Fix a return

* Fix test

* Fix mqtt tests

* Fix some more callbacks
2020-01-29 13:59:45 -08:00
Bas Nijholt bfa58f671a use isort to sort imports according to PEP8 for broadlink (#29690) 2019-12-09 11:48:52 +01:00
Felipe Martins Diel 5a24dbf599 Broadlink remote (#26528)
* Add broadlink remote control platform

* Fix order of the imports

* Add remote.py to .coveragerc

* Optimize MAC address validation

* Use storage helper class and improve code readability

* Add me to the manifest as a code owner

* Fix dosctring

* Add me to the code owners

* Remove storage schemas, rename storage keys and improve readability
2019-12-02 13:20:36 -08:00
Franck Nijhof 6a24d893c8 Use literal string interpolation in integrations B-D (f-strings) (#26378) 2019-09-03 17:09:59 +02:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Joakim Plate 7d5c1ede72 Broadlink fixup unintended breakage from service refactor (#23408)
* Allow host/ipv6 address for broadlink service

This matches switch config and is a regression fix

* Restore padding of packets for broadlink

* Drop unused import

* Fix comment on test
2019-04-25 21:33:05 -05:00
Joakim Plate 0a3e11aa12 Move Broadlink services to component (#21465)
* Register services in broadlink domain

* Add tests for broadlink services

* Resolve review comments

* One more review fix

* Restore auth retry

* Drop unused constants

* Fix flake8 errors
2019-04-12 20:11:36 +02:00
Paulus Schoutsen f5076188ef
Consolidate all platforms that have no tests (#22096)
* Consolidate

* Fix tests

* Update imports

* Fix import

* Use importlib because integration and package share name

* Fix more tests

* Update .coveragerc and CODEOWNERS
2019-03-16 20:44:05 -07:00