Commit Graph

25 Commits (99c5087c1e6868a3d7e819e1084728c5dcc558ac)

Author SHA1 Message Date
J. Nick Koston 30c99ce954
Fix memory leak in insteon (#49466) 2021-04-20 09:13:50 -07:00
Franck Nijhof 6932cf9534
Use contextlib.suppress where possible (#48189) 2021-03-23 14:36:43 +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
Tom Harris c07b146e58
Fix issue in python > 3.8.2 (#42213) 2020-10-22 22:04:06 +02:00
Tom Harris 75153dd4a3
Apply code review for insteon config flow (#39171)
* Move options import to async_setup_entry

* Add tests for insteon init

* Move common constants to const

* Clean up to adhear to standards

* Create mock insteon device manager

* Update for HA standards

* Use keys and align to config_flow steps

* Fix default port for hub v1

* Update doc string to represent function

* Remove dump print commands

* Add modem_type entry

* Simplify dict key test

* Setup platforms in async_setup_entry

* Black

* Black tests
2020-08-30 19:15:09 -04:00
Franck Nijhof 1c2ebdf307
Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
Tom Harris b1fd931cdc
Add config flow to insteon component (#36467)
* Squashed

* Fix requirements_all

* Update homeassistant/components/insteon/__init__.py

Only update options if the result is to create the entry.

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/insteon/__init__.py

No return value needed.

Co-authored-by: J. Nick Koston <nick@koston.org>

* Ref RESULT_TYPE_CREATE_ENTRY correctly

* Return result back to import config process

* Make DOMAIN ref more clear

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-08-11 18:04:44 -05:00
Tom Harris dbd821a564
Change Insteon backend module to pyinsteon from insteonplm (#35198)
* Migrate to pyinsteon from insteonplm

* Rename devices entities

* Print ALDB even if not loaded

* Add relay to name map

* Change insteonplm to pyinsteon

* Update requirements_all correctly

* Code review updates

* async_set_speed receive std speed value

* default speed to std medium value

* Call async methods for fan on/off

* Comment await required in loop

* Remove emtpy and add codeowner

* Make services async and remove async_add_job call

* Remove extra logging

* New device as async task and aldb load in loop

* Place lock in context bloxk

* Limiting lock to min

* Remove .env file
2020-05-17 15:27:38 +02:00
Tom Harris 7ff30fe29d
Reorganize insteon code (#31183)
* Reorganize code

* Code review
2020-01-30 10:47:44 +01:00
Ville Skyttä fa4fa30461 Various string cleanups (#30435)
* Remove some unnecessary string concatenations

* Replace some simple str.formats with f-strings

* Replace some string concatenations with f-strings
2020-01-03 14:47:06 +01:00
Diefferson Koderer Môro d5799d020a Move imports in insteon component (#28001) 2019-10-21 10:22:34 +02:00
Franck Nijhof f9edec19ad Use literal string interpolation in integrations H-J (f-strings) (#26380) 2019-09-03 17:27:14 +02:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Tom Harris 0595fc3097 Upgrade insteonplm to 0.16.0 and add INSTEON scene triggering (#24765)
* Upgrade insteonplm to 0.16.0 and add INSTEON scene triggering

* Fix spacing issue

* Dummy commit to trigger CLA

* Remove dummy change

* Code review changes

* Use ENTITY_MATCH_ALL keyword from const and lint cleanup

* Make entity method print_aldb private
2019-07-07 20:31:04 +02:00
cgtobi 2c07bfb9e0 Remove dependencies and requirements (#23024)
* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit fe7171b4cd.

* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit 391355ee2c.

* Remove dependencies and requirements

* Fix flake8 complaints

* Fix more flake8 complaints

* Revert non-component removals
2019-04-12 10:13:30 -07:00
Fabian Affolter 2d2c6cf4a1
Use constants from const.py (#21068)
* Use constants from const.py

* Fix lint issues
2019-02-19 14:09:06 +01:00
Brian Towles a30921e67d Set InsteonEntity name to be combo of description and address. (#17262)
* Set InsteonEntity name to be combo of description and address.

ie "LampLinc Dimmer 26453a" or "Keypad Dimmer 291abb_2"

Using a centralized network name

* Updated the name to have a more contextual references for device
functions then just the group id.

* Cleanup for hound

* Removed the _generate_network_address function.  Not used anymore

* Cleanup for lint

* clean for hound

* Moved descriptor mapper to be a class variable of the InsteonEntity in order to fix lib loading issue for lint

* Well, moved DescriptorMapper instance to a function variable now...

* fix hound

* Lint Cleanup

* Clean up docstrings

* Simplify Label lookup based on state name
2018-12-14 14:02:06 +01:00
Tom Harris 9efb90d23c Resolve IOLinc sensor name (#19050) 2018-12-13 16:52:12 +01:00
Tom Harris ddee5f8b86 Fix IOLinc sensor (#18250) 2018-11-06 10:36:52 +01:00
Tom Harris db536797be Bump insteonplm version to 0.15.0 (#17384) 2018-10-13 10:33:34 +02:00
Brian Towles 592e1dc96a Enable new registry rename for Insteon (#17171)
* Enable new registry rename for Insteon

* Segment unique_id from name
2018-10-07 13:12:33 +02:00
cdce8p 9aaf11de8c Async syntax 8/8 (#17022)
* Async syntax 8

* Pylint fixes
2018-10-01 08:52:42 +02:00
Tom Harris dcd7b9a529 Fix insteon Hub v1 support (#16472)
* Fix support for Hub version 1 (i.e. pre-2014 Hub model 2242)

* Bump insteonplm to 0.14.1

* Code review changes

* Clean up and better document set_default_port

* Simplify set_default_port based on code review

* Remove Callable type import

* Simplify port setup
2018-09-10 16:54:17 +02:00
Tom Harris d3791fa45d Add Cover to the Insteon component (#16215)
* Create cover platform

* Create insteon cover platform

* Bump insteonplm to 0.13.0

* Change async_add_devices to async_add_entities

* Missing doc string

* Simplify open and set_position

* Flake8

* Bump insteonplm to 0.13.1

* Code review changes

* Flake8 updates
2018-08-31 23:56:26 +02:00
Tom Harris a31501d99e Merge insteon_plm and insteon_local to insteon component (#16102)
* Implement X10

* Add X10 after add_device_callback

* Ref device by id not hex and add x10OnOffSwitch name

* X10 services and add sensor device

* Correctly reference X10_HOUSECODE_SCHEMA

* Log adding of X10 devices

* Add X10 All Units Off, All Lights On and All Lights Off devices

* Correct ref to X10 states vs devices

* Add X10 All Units Off, All Lights On and All Lights Off devices

* Correct X10 config

* Debug x10 device additions

* Config x10 from bool to housecode char

* Pass PLM to X10 device create

* Remove PLM to call to add_x10_device

* Unconfuse x10 config and method names

* Correct spelling of x10_all_lights_off_housecode

* Bump insteonplm to 0.10.0 to support X10

* Add host to config options

* Add username and password to config for hub connectivity

* Add username and password to config for hub

* Convert port to int if host is defined

* Add KeypadLinc

* Update config schema to require either port or host

* Solidify Hub and PLM configuration to ensure proper settings

* Update hub schema

* Bump insteonplm version

* Fix pylint and flake issues

* Bump insteonplm to 0.12.1

* Merge insteon_plm and insteon_local to insteon

* Rename insteon_plm to insteon

* Bump insteonplm to 0.12.2

* Flake8 cleanup

* Update .coveragerc for insteon_plm, insteon_local and insteon changes

* Add persistent notification

* Fix reference to insteon_plm

* Fix indentation

* Shorten message and fix grammer

* Add comment to remove in release 0.90

* Hound fix
2018-08-22 09:09:04 +02:00