Commit graph

614 commits

Author SHA1 Message Date
Malte Franken
d5813cf167 Make rest sensor and binary sensor more efficient ()
* create binary sensor even if initial update fails

* fixed broken test assertion

* fixed broken test assertion

* avoid fetching resource twice - manually in the setup_platform and then through add_devices

* raising PlatformNotReady instead of creating the sensor if the initial rest call fails; throttling the update to avoid fetching the same resource again immediately after setting up sensor

* rolled back throttling of the rest update call; can still avoid updating the binary sensor's rest resoure twice; fixed tests

* typo
2018-09-21 15:54:50 +02:00
Robert Svensson
90c18d1c15 deCONZ add via_hub attribute for device registry ()
* deCONZ add via_hub attribute for device registry

* A shorter way to get bridgeid
2018-09-21 09:21:44 +02:00
Ville Skyttä
227a1b919b More isort preparations ()
* Adjust config closer to currently established style conventions

* Adjust some imports for better outcome with their comments
2018-09-19 15:40:36 +02:00
Fabian Affolter
5e3e441aa0 Upgrade holidays to 0.9.7 () 2018-09-17 07:44:23 +02:00
Mattias Welponer
05922ac56a Add new devices to HomematicIP Cloud ()
* Add support for outdoor temperature sensor and cleanup

* Add support for rotary handle and water sensor

* Fix comment
2018-09-15 21:28:49 +02:00
Sergiy Maysak
f63dba5521 Multiple tag managers for Wireless Sensor Tags. ()
* Added support for multiple tag managers. Fixed typo for signal strength.

* Corrected broken merge.

* Fixed flake8/pylint error.

* Improved docstring.
2018-09-13 09:48:17 +02:00
Alexei Chetroi
7a52bbdf24 Allow only_cache parameter in zha.safe_read() ()
* Allow only_cache parameter in zha.safe_read()

* Use cache_only for binary_sensor.zha initial update.

* Use cache_only for fan.zha initial update.

* Use cache_only for sensor.zha initial update.

* Use cache_only for switch.zha initial update.

* Use cache_only for light.zha initial update.

* Refactor cached only read in zha platform.
2018-09-13 09:22:50 +02:00
Alexei Chetroi
f2203e52ef Add configure_reporting() method to zha component ()
* Add zha.configure_reporting() method.

Binds a cluster and configures reporting for the specified attribute.

* git add homeassistant/components/binary_sensor/zha.py

* Refactor sensor.zha to use new 'configure_reporting() method.

* Zha configure reporting - switch ()

* use configure_reporting for zha switch

* lint fixes

* Rename variables/classes to properly reflect the content
2018-09-13 09:11:47 +02:00
Aaron Bach
f96aee2832 Add config flow for OpenUV ()
* OpenUV config flow in place

* Test folder in place

* Owner-requested comments

* Tests

* More tests

* Owner-requested changes (part 1 of 2)

* Updated requirements

* Owner-requested changes (2 of 2)

* Removed unnecessary import

* Bumping Travis

* Updated requirements

* More requirements

* Updated tests

* Owner-requested changes

* Hound

* Updated docstring
2018-09-04 09:22:44 +02:00
Robert Svensson
645c3a67d8 Fix so that entities are properly unloaded with config entry () 2018-08-29 23:18:20 +02:00
Sebastian Muszynski
25ee8e551c Fix data_key override by parent class () 2018-08-29 22:29:34 +02:00
Robert Svensson
5341785aae Revert changes to platforms using self.device ()
* Revert tank_utility

* Fix Soundtouch

* Fix Plex

* Fix Emby

* Fix Radiotherm

* Fix Juicenet

* Fix Qwikswitch

* Fix Xiaomi miio

* Fix Nest

* Fix Tellduslive

* Fix KNX
2018-08-26 21:25:39 +02:00
Robert Svensson
97173f495c Device registry store config entry ()
* Allow device registry to optionally store config entries

* Connections and identifiers are now sets with tupels

* Make config entries mandatory

* Fix duplicate keys in test

* Rename device to device_info

* Entity platform should only create device entries if config_entry_id exists

* Fix Soundtouch tests

* Revert soundtouch to use self.device

* Fix baloobs comments

* Correct type in test
2018-08-25 10:59:28 +02:00
Robert Svensson
e91a1529e4
deCONZ - Support device registry ()
Add support for device registry in deCONZ component
2018-08-24 19:37:22 +02:00
Paulus Schoutsen
994b829cb4
add_devices -> add_entities ()
* add_devices -> add_entities

* Lint

* PyLint

* Revert external method in scsgate
2018-08-24 16:37:30 +02:00
Ville Skyttä
dd9d53c83e Update pydocstyle to 2.1.1 and flake8-docstrings to 1.3.0 ()
* Update pydocstyle to 2.1.1 and flake8-docstrings to 1.3.0

* Pydocstyle D401 fixes
2018-08-24 10:28:43 +02:00
Sebastian Muszynski
478eb48e93 Fix the protocol v2 data_key of several aqara devices ()
* Fix the protocol v2 data_key of several aqara devices

* Incorporate review
2018-08-22 15:29:43 +02:00
Fabian Affolter
b0c2d24997 Upgrade numpy to 1.15.1 () 2018-08-22 13:55:11 +02:00
Robert Svensson
0009be595c Device Registry ()
* First draft

* Generate device id

* No obscure registry

* Dont store config_entry_id in device

* Storage

* Small mistake on rebase

* Do storage more like entity registry

* Improve device identification

* Add tests

* Remove deconz device support from PR

* Fix hound comments, voff!

* Fix comments and clean up

* Fix proper indentation

* Fix pydoc issues

* Fix mochad component to not use self.device

* Fix mochad light platform to not use self.device

* Fix TankUtilitySensor to not use self.device

* Fix Soundtouch to not use self.device

* Fix Plex to not use self.device

* Fix Emby to not use self.device

* Fix Heatmiser to not use self.device

* Fix Wemo lights to not use self.device

* Fix Lifx to not use self.device

* Fix Radiotherm to not use self.device

* Fix Juicenet to not use self.device

* Fix Qwikswitch to not use self.device

* Fix Xiaomi miio to not use self.device

* Fix Nest to not use self.device

* Fix Tellduslive to not use self.device

* Fix Knx to not use self.device

* Clean up a small mistake in soundtouch

* Fix comment from Ballob

* Fix bad indentation

* Fix indentatin

* Lint

* Remove unused variable

* Lint
2018-08-22 10:46:37 +02:00
Tom Harris
a31501d99e Merge insteon_plm and insteon_local to insteon component ()
* 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
Fabian Affolter
0e1fb74e1b
Minor updates () 2018-08-21 21:25:16 +02:00
Ville Skyttä
dbd0763f83 Grammar and spelling fixes () 2018-08-19 22:29:08 +02:00
Max Prokhorov
2a210607d3 Wemo custom ports and network errors handling ()
* Update wemo component

* Support custom ports in static addresses
* Handle device_from_description exceptions
* Process static addresses before doing discovery
* Fail on inaccessable static address
* str.format instead of old formatting

* Validate static host[:port] earlier

* Fix comment formatting

* slice looks ambiguous in the log, keep voluptuous exception path intact
2018-08-16 08:14:54 -06:00
Sebastian Muszynski
31fbfed0a6 Fix magic cube support of the Aqara LAN Protocol V2 () 2018-08-13 08:17:15 +02:00
Franck Nijhof
e17e080639 ✏️ Corrects typo in code comments ()
`MomematicIP` -> `HomematicIP`
2018-08-11 08:47:41 +02:00
Mattias Welponer
a29f867908 Add HomematicIP Cloud smoke detector device ()
* Add smoke detector device

* Remove not needed __init__ functions
2018-08-09 14:43:13 +02:00
Fabian Affolter
51c30980df
Upgrade holidays to 0.9.6 () 2018-08-07 09:12:09 +02:00
Thomas Delaet
8a81ee3b4f Velbus auto-discovery ()
* remove velbus fan and light platforms

these platforms should not be there since they can be created with template components based on switch platform

* use latest version of python-velbus which supports auto-discovery of modules

* fix linting errors

* fix linting errors

* fix linting errors

* address review comments from @MartinHjelmare

* update based on automatic feedback

* fix linting errors

* update dependency

* syntax corrections

* fix lint warning

* split out common functionality in VelbusEntity
use sync methods for loading platforms
support unique_ids so that entities are registred in entity registry

* fix linting errors

* fix linting errors

* fix linting errors

* integrate review comments (common functionality in VelbusEntity class)

* rename DOMAIN import to VELBUS_DOMAIN

* revert change created by requirements script

* regen
2018-08-05 10:47:17 +02:00
Ville Skyttä
3246b49a45 Upgrade pylint to 2.1.0 ()
* Upgrade pylint to 2.1.0

* Remove no longer needed pylint disables
2018-08-04 15:22:22 +02:00
Aaron Bach
bdea9e1333 Add support for OpenUV binary sensors and sensors ()
* Initial commit

* Adjusted ownership and coverage

* Member-requested changes

* Updated Ozone to a value, not an index

* Verbiage update
2018-08-02 07:42:12 +02:00
Fabian Affolter
baa974a487
Upgrade numpy to 1.15.0 () 2018-07-29 08:46:20 +02:00
Jens Østergaard Nielsen
867f80715e Remove IHC XML Element from discovery data () 2018-07-28 19:37:12 +02:00
Ville Skyttä
b7c336a687 Pylint cleanups ()
* Pylint 2 no-else-return fixes

* Remove unneeded abstract-class-not-used pylint disable
2018-07-23 10:16:05 +02:00
digiblur
6f6d86c700 Add relay addr & chan config to alarmdecoder zones ()
Add relay addr & chan config to alarmdecoder zones
2018-07-21 17:31:07 +02:00
Ville Skyttä
2f7b79764a More pylint 2 fixes ()
## Description:

More fixes flagged by pylint 2 that don't hurt to have before the actual pylint 2 upgrade (which I'll submit soon).

## Checklist:
  - [ ] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
2018-07-20 11:45:20 +03:00
Tom Harris
e5f0da75e2 Mini-Remote events ()
* Add event handler to capture binary sensor on messages

* Log event trigger

* Log event firing

* Capture platform correctly

* Fix test for platform eq binary_sensor

* Create sensor events

* Add light and battery sensors

* Bump insteonplm version to 0.11.6

* Fix naming of BUTTON_PRESSED_STATE_NAME

* Fix naming of fire event methods

* Add logging

* Add DOMAIN definition

* Get state name from plm.devices

* Remove stale reference to button ID

* Fix reference to state name

* Remove incorrect ref to self

* Log remote button pressed event

* Change mode to button_mode and fix values to array

* Rename CONF_MODE to CONF_BUTTON_MODE

* Log platform create with mode

* Properly assign button_mode to track mode

* Implement is_on

* Change mini-remotes to events only

* Remove button_mode config option

* Fix reference to _fire_button_on_off_event

* Bump insteon version to 0.11.7

* Flake8 clean up

* Flake8 cleanup

* Use % format in logging per pylint

* Code review updates

* Resolve conflict

* Lint
2018-07-18 16:11:54 +02:00
fucm
6834e00be6 Add support for Tahoma Soke Sensor () 2018-07-18 12:38:34 +02:00
Ville Skyttä
bf17ed0917 More pylint 2 fixes ()
* Pylint 2 useless-import-alias fixes

* Pylint 2 chained-comparison fixes

* Pylint 2 consider-using-get fixes

* Pylint 2 len-as-condition fixes
2018-07-18 11:54:27 +02:00
lich
7d7c2104ea Customizable command timeout ()
* Customizable command timeout

* Change string to int

* update the tests. Do the same thing on the binary_sensor.command_line.
2018-07-17 22:58:30 +02:00
Ville Skyttä
e31dd4404e Pylint 2 fixes ()
* pylint 2 inline disable syntax fixes

* pylint 2 logging-not-lazy fixes

* pylint 2 consider-using-in fixes

* Revert pylint 2 inline disable syntax fixes addressing unused-imports

Will have a go at removing more unused imports altogether first.
2018-07-17 19:34:29 +02:00
Mattias Welponer
6db069881b Update homematicip_cloud with enum states ()
* Update to next version with enum states

* Change to generic dimmer class

* Update of requirement files

* Update to hmip lib to v0.9.7

* Missing update of requirements files

* Cleanup of icon properties
2018-07-15 02:59:19 +02:00
Marcelo Moreira de Mello
6197fe0121 Change Ring binary_sensor frequency polling to avoid rate limit exceeded errors () 2018-07-11 09:27:22 +02:00
Mattias Welponer
9970965718 Add HomematicIP Cloud Config Flow and Entries loading ()
* Add HomematicIP Cloud to config flow

* Inititial trial for config_flow

* Integrations text files

* Load and write config_flow and init homematicip_cloud

* Split into dedicated files

* Ceanup of text messages

* Working config_flow

* Move imports inside a function

* Enable laoding even no accesspoints are defined

* Revert unnecassary changes in CONFIG_SCHEMA

* Better error handling

* fix flask8

* Migration to async for token generation

* A few fixes

* Simplify config_flow

* Bump version to 9.6 with renamed package

* Requirements file

* First fixes after review

* Implement async_step_import

* Cleanup for Config Flow

* First tests for homematicip_cloud setup

* Remove config_flow tests

* Really remove all things

* Fix comment

* Update picture

* Add support for async_setup_entry to switch and climate platform

* Update path of the config_flow picture

* Refactoring for better tesability

* Further tests implemented

* Move 3th party lib inside function

* Fix lint

* Update requirments_test_all.txt file

* UPdate of requirments_test_all.txt did not work

* Furder cleanup in websocket connection

* Remove a test for the hap

* Revert "Remove a test for the hap"

This reverts commit 968d58cba1.

* First tests implemented for config_flow

* Fix lint

* Rework of client registration process

* Implemented tests for config_flow 100% coverage

* Cleanup

* Cleanup comments and code

* Try to fix import problem

* Add homematicip to the test env requirements
2018-07-06 17:05:34 -04:00
Robert Svensson
bedd2d7e41
deCONZ - new sensor attribute 'on' and new sensor GenericFlag ()
* New sensor attribute 'on'
* New sensor GenericFlag
2018-07-02 23:14:38 +02:00
Jason Hu
0a186650bf Fix an issue when user's nest developer account don't have permission () 2018-07-01 13:04:12 -04:00
Andy Castille
9db8759317 Rachio webhooks ()
* Make fewer requests to the Rachio API

* BREAKING: Rewrite Rachio component
2018-07-01 11:54:51 -04:00
Ville Skyttä
b92350fb55 Lint cleanup ()
* Remove unneeded inline pylint disables

* Remove unneeded noqa's

* Use symbol names instead of message ids in inline pylint disables
2018-06-25 13:05:07 -04:00
Martin Hjelmare
3893d8a876 Reorganize mysensors ()
* Move mysensors.py to package

* Move mysensors component to package

* Split code into multiple modules.

* Update coveragerc
2018-06-25 13:58:16 +02:00
Marcelo Moreira de Mello
9de7034d0e Added attribute attribution to Digital Ocean component () 2018-06-24 13:36:27 +02:00
Andrey
1e7333eeb6 Switch to own packaged version of pyflic () 2018-06-19 10:31:21 +02:00