hass-core/homeassistant
Teemu R 94be43e3e1 Add support for automatic discovery of TP-Link switches, bulbs and dimmers (#18091)
* {switch,light}.tplink: use deviceid as unique id, fetch name from the device during initialization

* raise PlatformNotReady when no device is available

* Use mac instead of deviceid

* remove name option as obsolete

* Add support for configuration flow / integration

Allows activating automatic discovery of supported devices from the configuration

* Fix linting, update requirements_all.txt

* start cleaning up tplink component based on feedback

* add device info, improve config handling

* Allow overriding detected devices via configuration file

* Update requirements.txt

* Remove debug logging

* make hound happy

* Avoid I/O during init and simplify the code, remove remains of leds_on

* Fix issues based on feedback, use consistent quotation marks for device info

* add async_setup_platform emiting a deprecation warning

* Avoid blocking the I/O, check for None on features

* handle some Martin's comments, schema-validation is still missing

* use async_create_task instead of async_add_job, let core validate the schema

* simplify configuration handling by storing the configuration data separately from initialized instances

* add default values to schema, make hound happy

* with defaults set by schema, simplify the checks. add async_unload_entry

* Use constant for data structure access

* REWORD add a short note about async_unload_entry

* handle feedback from Martin, config_data is checked against Noneness

* use pop to remove the domain on unload

* First steps to add tests for the new tplink component

* embed platforms under the component directory

* Fix tests by mocking the pyhs100 internals

* Fix linting

* Test against multiple instances of devices, tidy up

* (hopefully) final linting round

* Add pyHS100 to test requirements

* log always the warnings occured during an update to make them easy to see

* revert back the warning behavior (requirement for silver level in IQS)

* Unload only when an entry is being loaded and add tests for that

Thanks @MartinHjelmare for pointing this out!

* Fix linting

* Bump the upstream lib, fixes most prominently the HSV setting on bulbs

* Test unloading for all platforms, clear the data storage instead of popping it out, making it possible to reconfigure after removal without restarting hass first

* Use class variables instead of instance variables for bulb states, required for HS220

* Use new-style format string

* Fix indenting, uppercase the mock constant

* Run black on test_init, hopefully that will finally fix the weird formatting (pycharm, pylint and hound seems to have different opinions...)
2019-02-21 20:29:07 +01:00
..
auth Added command_line auth provider that validates credentials by calling a command (#19985) 2019-02-06 16:36:41 -08:00
components Add support for automatic discovery of TP-Link switches, bulbs and dimmers (#18091) 2019-02-21 20:29:07 +01:00
helpers Add legacy PLATFORM_SCHEMA config validation (#21072) 2019-02-16 23:05:06 -08:00
scripts Add PLATFORM_SCHEMA_BASE support to check_config.py (#20663) 2019-02-01 08:14:02 -08:00
util Load as many components in parallel as possible (#20806) 2019-02-07 22:56:40 +01:00
__init__.py
__main__.py Lint 2018-10-02 10:35:00 +02:00
bootstrap.py Update bootstrap.py 2019-02-16 14:51:30 +01:00
config.py Add default_config component (#20799) 2019-02-07 20:07:15 -08:00
config_entries.py Add support for automatic discovery of TP-Link switches, bulbs and dimmers (#18091) 2019-02-21 20:29:07 +01:00
const.py Deprecate conf_update_interval (#20924) 2019-02-17 06:23:09 +01:00
core.py Prevent invalid context from crashing (#21231) 2019-02-20 08:02:56 +01:00
data_entry_flow.py Add webhook + IFTTT example (#16817) 2018-09-30 14:45:48 +02:00
exceptions.py Check admin permission before able to manage config entries 2018-12-13 16:13:43 +01:00
loader.py Prevent partial custom component overlays (#21070) 2019-02-21 09:41:36 +01:00
monkey_patch.py Narrow scope of various pylint inline disables (#15364) 2018-10-10 12:17:11 +02:00
package_constraints.txt Remove constraint from regex (#21239) 2019-02-20 21:31:41 +01:00
requirements.py Improve package loadable (#16237) 2018-08-28 12:52:18 +02:00
setup.py Add default_config component (#20799) 2019-02-07 20:07:15 -08:00