Commit Graph

1465 Commits (0742b046b91d9b067023d45e8cb75efe248f8578)

Author SHA1 Message Date
Aaron Bach 24840cce23
Add a config flow for Recollect Waste (#43063)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-11-12 11:00:42 +01:00
djtimca d47b3a5f44
Fix Aurora integration including externalizing API to PyPi and adding config_flow (#43045)
Co-authored-by: Pawel <pszafer@gmail.com>
2020-11-11 20:36:16 +01:00
Franck Nijhof 3380b69d54
Remove iAlarm integration (ADR-0004) (#43010) 2020-11-09 18:35:09 +01:00
Simone Chemelli 05dc457955
Handle Shelly light domain for relay switches ( fw >=1.9 ) (#42508)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-11-05 18:38:53 +01:00
Joakim Sørensen a199d7af59
Move to Launch Library 2 (#42723)
* Move to Launch Library 2

* isort

* Apply suggestions from code review

* Add const to .coveragerc
2020-11-05 15:42:12 +01:00
Niccolo Zapponi 5ddf99e496
Add support for OpenWeatherMap One Call API (#39839) 2020-11-03 08:37:30 -10:00
Schachar Levin af048715f0
Add next alarm time sensor to Garmin (#40420)
* Add sensor for garmin next alarm(s)

* code-review changes

* type fix

* linter fix

* review fixes
2020-10-23 23:01:29 +02:00
Erik Montnemery b626df1316
Improve cast integration tests (#42229)
* Improve cast tests

* Address review comments

* Further cleanup of tests
2020-10-23 16:16:55 +02:00
Greg Dowling 9a54c31c34
Add media browser support to roon media player (#42061) 2020-10-22 14:54:55 +02:00
Chris Talkington d8577a1550
Add config flow for cloudflare (#41167)
* add config flow for cloudflare

* Create const.py

* work on flow.

* remove const.

* lint.

* Apply suggestions from code review

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

* Update config_flows.py

* Update homeassistant/components/cloudflare/strings.json

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

* Update strings.json

* Apply suggestions from code review

* Update __init__.py

* Update __init__.py

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-10-21 09:09:00 -05:00
rajlaud fcdb54d878
Add browse media support to squeezebox integration (#40642)
* Add browse media support to squeezebox integration

* Move browse media logic to browse_media.py

* Fix missing command when loading single url

* Update .coveragerc

* Handle empty library gracefully

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Implement suggestions from code review

* Additional suggestion from code review

* Use MEDIA_CLASS_GENRE

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-10-20 01:17:00 -05:00
Paulus Schoutsen 39ba0fc7ee
Remove BOM integration because it uses webscraping (#41941)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-10-17 13:56:11 +02:00
J. Nick Koston ad6ce5fa83
Convert rest sensors to async using httpx (#41973) 2020-10-16 19:21:13 -05:00
Paulus Schoutsen 2f69b53bc3
Fix upcloud coverage that is breaking CI (#41934) 2020-10-16 11:30:51 +02:00
Jason Hunter c10fe4f723
Add sensors to Xbox integration (#41868)
* favorited friends binary sensors

* add binary_sensor to .coveragerc

* fix copy/paste comments...

* make sensor entities instead of attributes

* address PR review comments

* default state to None
2020-10-15 19:11:05 -04:00
On Freund 086378c48f
Add media browser capability to volumio (#40785) 2020-10-15 15:49:36 +02:00
Jason Hunter 2b1fc90de7
Add Media Source to Xbox Integration (#41833)
* initial implementation of xbox media source

* minor fixes

* fix lint

* add media class map to remove multi-line ternary
2020-10-14 15:02:08 -04:00
epenet 3cba25a892
Add test coverage for onewire (#40786)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-10-14 10:19:12 +02:00
Jason Hunter 3013f39191
Add Remote entity to Xbox Integration (#41809) 2020-10-13 21:00:44 -04:00
Jason Hunter c3ccea52a5
Add Browse Media to Xbox (#41776)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-10-13 17:51:51 +02:00
Jason Hunter 9877e8e25b
Add Xbox Integration (#41697)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-10-13 15:37:01 +02:00
Niccolo Zapponi 8a45bc2d13
Add support for SimpliSafe sensors (#41080)
* Add support for SimpliSafe sensors

* Turn sensor refresh rate to a configurable setting

* Set minimum to scan interval

* Removed dynamic sensor refresh rate

* Refactoring

* Refactoring

* Move battery entities to binary_sensor platform

* Bug fix

* Clean up

* Simplified device info override

* Ignore sensor cache
2020-10-12 11:31:55 -06:00
Angelo Gagliano 874e1f6103
Prevent tplink missing devices and unavailable state (#39762)
* Adds self to codeowners for tplink

* Adds retry to update to prevent missing devices

* Runs through isort and corrects async commit

* Runs through black

* Runs through pre-checks

* Corrects and matches var names

* Re-runs through black

* Corrects var name

* Removes the retry loop and in favor of async add

* Cleanup imports

* Removes no longer valid test

* Removes is_ready and only log retry once

* Corrects switch logging vars

* Adds list of entities to add_entities

* Consumes exception for attempt_update

* Consumes specific exception

* Removes unnecessary update

* Reducing back to 2 seconds

* Removes useless return

* Call get_sysinfo for all at once

* Formated black

* Adds missing docstirng

* Corrects docstring

* Update homeassistant/components/tplink/light.py

Co-authored-by: Anders Melchiorsen <amelchio@nogoto.net>

* Corrects sysinfo call

* Adds default for host vars

* Adds log when device responds again

* Revert host alias default

* Removes unncessary host var

* Removes host var

* Get device details from sysinfo

* Use host and alias for log msg

* Gets hosts from smartbulb

* Changes retry logging to debug

* Attempts coverage add

* Removes unused import

* Updates tests for new retry

* Runs through isort

* Removes unneeded try

* Prevents static entries from failing integration

* Format black

* Forces an update after turn on off

* Remove common test

* Revert update after turn_on off

* Adds patch for sleep_time 0

* Returns False when update fails

Co-authored-by: Anders Melchiorsen <amelchio@nogoto.net>
2020-10-11 21:10:36 +02:00
Martin Hjelmare e006e0ddb3
Revert zoneminder config flow (#41395) 2020-10-07 16:28:49 +02:00
Raman Gupta 6db4075a23
Add OZW node config parameters websocket commands (#40527)
* add websocket commands to retrieve and set config parameters for a node

* move set_config_parameter into generic function and refactor service and WS API

* add payload to return to make service call behave the same way it did before

* create response class

* update error message to pass tests

* move things a bit to reduce LOC

* add tests

* handle logging errors better and make new response class more generic to prepare for lock user code work

* remove unused function parameter

* invert check

* add additional error checking

* refactor a bit to remove repeat code

* revert log msg change

* one more refactor to create generic get_config_parameters function

* change if logic for consistency

* fix test

* add support to provide bool value in set_config_parameter service call

* standardize parameter names on service call

* add test coverage

* fix tests and message sending

* remove unnecessary logging import

* fix one test to get missing coverage

* update per martin and kpines reviews

* remove false assertion

* string line length

* add support for Decimal config param, remove node instance ID as input, and move helper functions to node.py

* cast Decimal appropriately

* revert change to support Decimal for config params since they are not supported as a config param type

* revert to using error arguments to make next PR for WS lock commands easier

* switch to class method and add guard for list Value not being a number

* update logic to use new openzwavemqtt util methods

* add support for bitsets

* use parent exception class

* bump openzwavemqtt version, remove node.py from .coveragerc and put file references in the right place

* add comment

* improve config validation

* remove bitset support from config validation

* re-add bitset support with some additional tests

* move send_result out of try block
2020-10-05 21:47:28 +02:00
Daniel Hjelseth Høyer 9bdc716e60
Include config flow modules in coverage (#40798)
* update coveragerc

* typo
2020-09-30 19:55:26 +02:00
Quentame 1d816d25f7
Add Surveillance Station home mode switch for Synology DSM (#40490)
* Use camera name as device name

* Add Surveillance Station home mode switch for Synology DSM

- camera uses Surveillance Station as device parent
- camera uses camera name instead of NAS name + camera name

* Without device_class otherwise no icon

* Update .coveragerc
2020-09-30 18:27:06 +02:00
jan iversen 0ca19133d9
Add tests for modbus binary sensor (#40367)
* Add test coverage of binary sensor.

Update conftest to be generic.

* Pass total config structure to run_base_test.

Simple devices like sensor/switch do only have one entry in the
dict array, whereas e.g. switch have multiple entries.

* Use STATE_ON / _OFF for binary_sensor test.

* Update coveragerc

Only exclude files that uses a third party library.

* Remove modbus/* from coveragerc

* Remove modbus from .coveragerc

* Update .coveragerc

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-09-27 20:00:44 -05:00
epenet f886ea9e3d
Move onewire constants to separate file (#40550)
* Move constants to separate file

* Ignore coverage of const.py
2020-09-27 19:02:20 -05:00
tkdrob 67a7b28c84
Add Integration for Goal Zero Yeti Power Stations (#39231)
* Add Integration for Goal Zero Yeti Power Stations

* Goal Zero Yeti integration with config flow

* Remove unused entities

* Remove entry from requirements_test_all

* Pylint fix

* Apply suggestions from code review

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Add tests for goalzero integration

* Fix UNIT_PERCENTAGE to PERCENTAGE

* isort PERCENTAGE

* Add tests

* Add en translation

* Fix tests

* bump goalzero to 0.1.1

* fix await

* bump goalzero to 0.1.2

* Update tests/components/goalzero/__init__.py

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

* apply recommended changes

* isort

* bump goalzero to 0.1.4

* apply recommended changes

* apply recommended changes

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-09-27 12:44:21 -05:00
Oliver Acevedo 0c12af347e
Add Omnilogic integration (#40474)
* Scaffold

* Added the en translation

* Modified the name

* Basic functionality for config flow.

* Pulled in enough to validate config flow works.

* Update manifest.json

* initial data polling (water and air temp sensors)

* Adding sensors, debugging update function

* polling updates working

* support for new data format from library

* Updated entity_id, friendly name, conversion for ppm, attributes for hayward display units, MSPSystemID and component systemID

* Fixed errors for PR

* clean up

* Add login exc, check if configured, test login.

* Remove debug print.

* Black formatting, ran isort, update requirements.

* Updated w isort. fix flake8 failures.

* Fix flake8 errors

* Fixed self.attrs to remove invalid self._ values - small change

* Missed on small change - fixing attributes

* Updated naming, updated unit of measure, updated icon, bumped omnilog…

* Updated to fix flake8 issues in __init__.py and config_flow.py

* Updated test_config_flow.py to pass, updated config_flow.py to correct errors in test

* Remove comments in preparation for PR

* update .covezragerc

* Formatting fix

* Rewrote sensors to dynamically add all BOWs, pumps, clorinators. Still to do - add CSAD sensors.

* Rewrote sensors to dynamically add all BOWs, pumps, clorinators. Still to do - add CSAD sensors.

* Added CSAD sensors for pools that have them.

* Added CSAD sensors for pools that have them.

* Fixed CSAD to not create if blank or don't exist, removed broad except usage to pass linting.

* Updated entity naming convention. Fixed linting issues.

* Added device association to the back yard / omnilogic system

* Removed .0 from ppm values when returning imperial values for salt sensor

* Updated to return state = None for water temp when pump is off, handled Chlorinator operatingMode = 2, and added PlatformNotReady check

* Corrected exception from Omnilogic library

* Bumped omnilogic to 0.3.7. Added alarm sensor/data to sensors. Handle pump off condition for ph and orp sensors.

* Bumped omnilogic to 0.3.7. Added alarm sensor/data to sensors. Handle pump off condition for ph and orp sensors.

* Bumped omnilogic to 0.3.7. Added alarm sensor/data to sensors. Handle pump off condition for ph and orp sensors.

* Removed nested_lookup dependency, bumped omnilogic.py to 0.3.8.

* Fixed lint error

* Added logging for sensor creation.

* Fixed linting errors with logging.

* Fixed explicit chaining of raised error. Fixed issue with alarm sensor.

* Fixed manifest.json based on feedback.

* Fixed self.attrs, should_poll, CoordinatorEntity, SCAN_INTERVAL from comments in PR.

* Addressed unique_id, moved data update coordinator, addressed minor other issues from testing

* Created main OmniLogic entity for common items, reworked DataUpdateCoordinator to it's own class.

* Addressed config_schema not used in __init__.py

* Fixed linting issues.

* Addressed several comments, still todo - separate sensor classes.

* Split the Omnilogic Sensors into separate logical classes for simpler logic.

* Fixed snake case lint error for AddAlarms (to add_alarms)

* Addressed config_flow issues from comments.

* Changed addressed ConfigNotReady issue from comments.

* Updated strings.json and generated corrected en.json with translations.

* Updated en.json to standard generated file.

* Added config_flow tests and updated issue with config_flow on cannot_connect

* Added test case for incomplete information entered.

* Compressed logic in the sensor classes to reduce duplication.

* Updated strings.json for polling_interval, added generic exception handling on config flow.

* Removed omnilogic from the .coveragerc omit file.

* Updated test_config_flow to follow recommended pattern.

* Excluded sensor.py from test coverage tests.

* Corected minor issues in test_config_flow from comments

* Fixed linting issues on last commits

* Fixed linting issues.

* Corrected issue when temp state is not available from Omnilogic

* Added omnililogic_common.py from .coveragerc to bypass test coverage check.

* Return false on Login Exception, handle OmniLogicException in config_flow and in tests.

* Handle all exceptions and in config_flow and tests, clarified test naming.

* Broke out test cases per comments.

* Regenerated en.json file.

* Addressed changes from comments in PR.

* Added session and bumped API to 0.4.0, addressed other comments from PR.

* Addressed entitydata (missed earlier).

* Fixed pylint issue

* Added test case for options flow in test_config_flow.py

* Removed super() and used self when calling methods in current class.

* Addressed comments in PR.

* Addressed comments in PR.

* Updated translations file.

* Rewrote data coordinator to output dict for easy searching.

* Updated chlorinator unit when chlorinator is on/off only

* Scaffold

* Added the en translation

* Modified the name

* Basic functionality for config flow.

* Pulled in enough to validate config flow works.

* Update manifest.json

* initial data polling (water and air temp sensors)

* Adding sensors, debugging update function

* polling updates working

* support for new data format from library

* Updated entity_id, friendly name, conversion for ppm, attributes for hayward display units, MSPSystemID and component systemID

* Fixed errors for PR

* clean up

* Add login exc, check if configured, test login.

* Remove debug print.

* Black formatting, ran isort, update requirements.

* Updated w isort. fix flake8 failures.

* Fix flake8 errors

* Fixed self.attrs to remove invalid self._ values - small change

* Missed on small change - fixing attributes

* Updated naming, updated unit of measure, updated icon, bumped omnilog…

* Updated to fix flake8 issues in __init__.py and config_flow.py

* Updated test_config_flow.py to pass, updated config_flow.py to correct errors in test

* Remove comments in preparation for PR

* update .covezragerc

* Formatting fix

* Rewrote sensors to dynamically add all BOWs, pumps, clorinators. Still to do - add CSAD sensors.

* Rewrote sensors to dynamically add all BOWs, pumps, clorinators. Still to do - add CSAD sensors.

* Added CSAD sensors for pools that have them.

* Added CSAD sensors for pools that have them.

* Fixed CSAD to not create if blank or don't exist, removed broad except usage to pass linting.

* Updated entity naming convention. Fixed linting issues.

* Added device association to the back yard / omnilogic system

* Removed .0 from ppm values when returning imperial values for salt sensor

* Updated to return state = None for water temp when pump is off, handled Chlorinator operatingMode = 2, and added PlatformNotReady check

* Corrected exception from Omnilogic library

* Bumped omnilogic to 0.3.7. Added alarm sensor/data to sensors. Handle pump off condition for ph and orp sensors.

* Bumped omnilogic to 0.3.7. Added alarm sensor/data to sensors. Handle pump off condition for ph and orp sensors.

* Bumped omnilogic to 0.3.7. Added alarm sensor/data to sensors. Handle pump off condition for ph and orp sensors.

* Removed nested_lookup dependency, bumped omnilogic.py to 0.3.8.

* Fixed lint error

* Added logging for sensor creation.

* Fixed linting errors with logging.

* Fixed explicit chaining of raised error. Fixed issue with alarm sensor.

* Fixed manifest.json based on feedback.

* Fixed self.attrs, should_poll, CoordinatorEntity, SCAN_INTERVAL from comments in PR.

* Addressed unique_id, moved data update coordinator, addressed minor other issues from testing

* Created main OmniLogic entity for common items, reworked DataUpdateCoordinator to it's own class.

* Addressed config_schema not used in __init__.py

* Fixed linting issues.

* Addressed several comments, still todo - separate sensor classes.

* Split the Omnilogic Sensors into separate logical classes for simpler logic.

* Fixed snake case lint error for AddAlarms (to add_alarms)

* Addressed config_flow issues from comments.

* Changed addressed ConfigNotReady issue from comments.

* Updated strings.json and generated corrected en.json with translations.

* Updated en.json to standard generated file.

* Added config_flow tests and updated issue with config_flow on cannot_connect

* Added test case for incomplete information entered.

* Compressed logic in the sensor classes to reduce duplication.

* Updated strings.json for polling_interval, added generic exception handling on config flow.

* Removed omnilogic from the .coveragerc omit file.

* Updated test_config_flow to follow recommended pattern.

* Excluded sensor.py from test coverage tests.

* Corected minor issues in test_config_flow from comments

* Fixed linting issues on last commits

* Fixed linting issues.

* Corrected issue when temp state is not available from Omnilogic

* Added omnililogic_common.py from .coveragerc to bypass test coverage check.

* Return false on Login Exception, handle OmniLogicException in config_flow and in tests.

* Handle all exceptions and in config_flow and tests, clarified test naming.

* Broke out test cases per comments.

* Regenerated en.json file.

* Addressed changes from comments in PR.

* Added session and bumped API to 0.4.0, addressed other comments from PR.

* Addressed entitydata (missed earlier).

* Fixed pylint issue

* Added test case for options flow in test_config_flow.py

* Removed super() and used self when calling methods in current class.

* Addressed comments in PR.

* Addressed comments in PR.

* Updated translations file.

* Rewrote data coordinator to output dict for easy searching.

* Updated chlorinator unit when chlorinator is on/off only

* Fixed ORP method not being @property, fixed unique_id potential issue. Does not address comments from PR.

* Rewrote coordinator for updated dict structure, rewrote sensors to parse new data structure.

* Added alarms as attributes on all entities which support alarm reporting.

* Updated SENSOR_TYPES to sensor_types to adhere to snake case in pylint.

* Addressed PR comments.

* Update homeassistant/components/omnilogic/sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/omnilogic/sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/omnilogic/sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/omnilogic/sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/omnilogic/sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/omnilogic/sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/omnilogic/sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/omnilogic/sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/omnilogic/sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/omnilogic/sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/omnilogic/sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/omnilogic/sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/omnilogic/sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/omnilogic/sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/omnilogic/sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/omnilogic/sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Removed binary sensor conditions (alarms, on/off sensor types) and added ability for multiple guard conditions

* Update homeassistant/components/omnilogic/sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Updated per comments in PR for Pump Type and removal of force_update().

* Update homeassistant/components/omnilogic/sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/omnilogic/common.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Correctly asserting conditions for the login exception case.

* Update .coveragerc

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Mike Hershberger <mike.hershberger@gmail.com>
Co-authored-by: Chad <54695185+chadlyy@users.noreply.github.com>
Co-authored-by: Tim Empringham <tim.empringham@live.ca>
Co-authored-by: djtimca <60706061+djtimca@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-09-25 17:55:10 +02:00
Tom Schneider 6e8e4eedb5
Add binary_sensor for elevator states to hvv_departures (#36822)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-09-22 17:42:50 +02:00
Perry Naseck 0582bf7746
Firmata analog input, PWM/analog output, deprecate arduino (#40369)
* firmata analog input

* firmata pwm/analog out, use more HA const

* firmata update pymata to 1.19

* deprecate arduino, firmata supersedes it

* firmata sensor diff min, pull review quality changes

* firmata condense platform setup into loop
2020-09-22 09:44:16 +02:00
Brett 4f5d3b4035
Rebuilt Splunk using custom library (#40123)
* Rebuilt Splunk using splunk_data_sender

* Fixing lint issues

* Apply suggestions from code review

Recommended Fixes

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Moved to single send queue and fixed ssl verify

* Using coroutine and Asyncio.lock

* Changed to custom library hass_splunk

* Fixed "use_ssl" parameter

* Better error catching

* Better error log

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-09-20 11:22:43 +02:00
Robert Van Gorkom 70173488a8
Add config support to zoneminder integration (#37060)
* Add config support to zoneminder integration.

* Fixing spelling issue.
Adding self to maintainers.
Updating config flows generated file.

* Maintain zoneminder functionality without breaking changes.

* Addressing lint feedback.
Updating code owners.

* Using non-blocking calls.

* Adding tests package file.

* Update service description.

Co-authored-by: Rohan Kapoor <rohan@rohankapoor.com>

* Resolving conflicts in requirements file.

* Resolving more conflicts.

* Addressing PR feedback.

* Merging from dev.

Co-authored-by: Rohan Kapoor <rohan@rohankapoor.com>
2020-09-16 22:58:51 -07:00
Chris Talkington 00acb180d6
Add canary alarm_control_panel tests (#40029)
* add canary alarm_control_panel tests

* Update .coveragerc

* Create test_alarm_control_panel.py

* Update __init__.py

* Update __init__.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update __init__.py

* Update __init__.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py
2020-09-13 16:36:26 -05:00
AJ Schmidt c32f698671
Add Config Flow to AlarmDecoder (#37998) 2020-09-13 12:29:25 -05:00
Xiaonan Shen b66aaeea99
Add camera support to synology_dsm (#39838)
* Add camera support to synology_dsm

* Code improvements

* More code improvements
2020-09-10 21:08:37 +02:00
Chris Talkington 74219663d6
Fix nzbget sensors (#39833)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-09-09 14:56:40 +02:00
Paulus Schoutsen 1e2741ff1b
Some shelly fixes (#39798) 2020-09-08 15:12:20 +02:00
Simone Chemelli 0c8630a2f0
Support shelly cover(roller) mode (#39711)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-09-08 10:35:01 +02:00
Tom bb9ea7ce6e
Add tests for Plugwise integration (#36371) 2020-09-08 08:37:44 +02:00
cgtobi ef8cdf0405
Add Kodi media browser support (#39729)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-09-07 18:22:20 +02:00
Paulus Schoutsen b07628ae57
Rework Shelly sensors (#39747)
* Rework Shelly sensors

* Lint

* Add shelly/entity to coveragerc
2020-09-07 14:13:20 +02:00
Evgeny b0192cf9c0
Add OpenWeatherMap config_flow (#34659)
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-09-04 18:22:50 -05:00
Andrew Marks 01bac9f433
Refactor sharkiq tests (#39564)
* Refactor sharkiq tests

* Fix linting

* Remove unussed logger

* Test one more code branch

* Don't patch integration files

* Remove legacy calls

* Linting fixes

* Refactor coordinator update tests

* Reformat test params

* Refector config flow tests

* Minor code cleanup

* Fix spelling error

* Address review

* Minor formatting change

* Remove vacuum.py from .coveragerc
2020-09-04 15:13:11 -05:00
Markus Bong fa1b8c824c
Add devolo thermostat devices (#38594)
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-09-04 08:33:54 -05:00
Angelo Gagliano eb7742ea7c
Add support for VeSync Fans (#36132)
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-09-03 21:05:37 -05:00
Maciej Bieniek 226406b853
Improve tests for GIOS integration (#39514) 2020-09-03 09:27:21 +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
Arda ŞEREMET e707b50658
Add integration for ProgettiHWSW automation boards (#37922)
* Opened a new fresh page to clean my mess.

* Solved pylint warnings

* Fixing pylint issue of defining attr outside init.

* Excluded files from being tested by codecov.

* Solved binary sensor error.

* Fixed some stylisation errors.

* Resolved input not updating problem.

* Added port entry to test file.

* Added tests for create_entry.

* Added support for better state management.

* Increased code coverage of config_flow.py & made some tweaks.

* Increased coverage of config_flow.py by adding tests for unknown exceptions.

* A small bugfix.

* Stylised code as per Chris' suggestions.

* Stylised code again.

* Improved quality of test code.

* Added step_id in config flow tests.
2020-08-30 15:03:33 -05:00
Andrew Marks 3d1ff5b8d0
Add sharkiq integration for Shark IQ robot vacuums (#38272)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-08-30 15:26:11 +02:00
Maciej Bieniek 4aa8b6cad8
Add basic binary_sensor support to Shelly (#39365) 2020-08-30 14:16:41 +02:00
Chris Talkington 7469f57a7b
Add config flow to nzbget (#38938)
* work on config flow

* Update test_init.py

* work on config flow

* Update test_config_flow.py

* Update test_config_flow.py

* Update __init__.py

* Update test_config_flow.py

* Update __init__.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Apply suggestions from code review

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

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update config_flow.py

* Update __init__.py

* Update __init__.py

* Create coordinator.py

* Update __init__.py

* Update sensor.py

* Update __init__.py

* Update .coveragerc

* Update coordinator.py

* Update __init__.py

* Update coordinator.py

* Update __init__.py

* Update coordinator.py

* Update config_flow.py

* Update __init__.py

* Update coordinator.py

* Update __init__.py

* Update test_config_flow.py

* Update coordinator.py

* Update test_config_flow.py

* Update test_init.py

* Update homeassistant/components/nzbget/coordinator.py

* Update test_config_flow.py

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-08-29 16:47:00 -05:00
Paulus Schoutsen 4b8217777e
Add basic light and sensor support to Shelly (#39288)
* Add basic light platform

* Add sensor support

* Bump aioshelly to 0.2.1

* Lint

* Use UNIT_PERCENTAGE

Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com>

* Format sensor.py

Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com>
2020-08-28 17:33:34 +02:00
Felipe Martins Diel e4d29bf3ec
Add tests for Broadlink sensors (#39230)
* Add tests for Broadlink sensors

* Remove sensor.py from .coveragerc
2020-08-26 22:43:17 -05:00
Chris Talkington ab6fb5cb77
Ensure unique ids are generated for surepetcare (#39196)
* ensure unique ids are generated for surepetcare

* Create test_binary_sensor.py

* work on tests

* Update test_binary_sensor.py

* Update __init__.py

* Update __init__.py

* Update test_binary_sensor.py

* Update test_binary_sensor.py

* Update test_binary_sensor.py

* Update test_binary_sensor.py

* Update test_binary_sensor.py

* Update test_binary_sensor.py

* Update __init__.py
2020-08-25 11:34:14 -05:00
Paulus Schoutsen ca2bc9906d
Add Shelly integration (#39178) 2020-08-24 12:43:31 +02:00
J. Nick Koston 3cc099af80
Make emulated_hue upnp responder async (#39126) 2020-08-23 09:50:59 +02:00
Martin Hjelmare 3cea3eb6e5
Remove dead ozw discovery code (#39098) 2020-08-21 12:44:40 +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
Franck Nijhof d3389fa22e
Sentry integration enhancements (#38833)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-08-20 11:37:27 +02:00
sean tearney 9244bf28ef
Add Agent DVR Alarm Control Panel (#36468)
* Add Agent DVR Alarm Control Panel

* code review

* remove return statement
2020-08-13 07:28:06 +02:00
Greg Dowling e9b50706a9
Add roon media player integration (#37553)
* Import roon code.

* Fix flake8/pylint issues.

* Fix lint issues, extend timeout, change contact infomation.

* Add new files to .coveragerc

* Make file executable.

* Fix problem with integration not working after initial creation.

* Improve logic unavailable players by caching data.

* Review changes

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Review changes

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Review changes

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Review changes

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Review changes

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Review changes

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Review changes

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Review changes

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Review changes

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Review changes

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update review suggestions

* Rremove custom play action script.

* Add test requirements.

* Tidy manifest.

* Missed fixes.

* Refactor config_flow to use current pattern.

* Add config_flow tests.

* Refactor to use signal dispatch helpers.

* Remove ToDo: for now.

* Remove remaining zone / source logic for initial release,

* Stop authenticate blocking, handle timeout.

* Removed unneeded code.

* Review comments update.

* Fix comment.

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Fix bug in seek.

* Use sync rather than async update

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Upgrade library, remove exception now caught in library,

* Review comments.

* Review changes

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Check for duplicate host before adding.

* Review comment.

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Remove unused code, revise turn_on/turn_off.

* Sync translations.

* Make interim timeout const.

* Refactor tests.

* Add tests with an existing config entry.

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Remove CannotConnect

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-08-12 09:09:47 -04: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
Eliseo Martelli 9bc68b9a73
Remove prezzibenzina integration (ADR-0004) (#38736) 2020-08-11 10:17:34 +02:00
Maciej Bieniek a7e19c8896
Improve tests for AccuWeather integration (#38621)
* Add more tests

* Add tests for sensor platform

* Add more tests

* More tests

* Simplify parsing of attributes

* Change Quality scale to platinum

* Patch the library in the manual update entity test

* Add unsupported condition icon test

* Do not patch _async_get_data

* Apply suggestions from code review

* Update config_flow.py

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

* Update tests/components/accuweather/test_weather.py

* Apply suggestions from code review

* Add return_value

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-08-09 09:21:36 -05:00
Markus Bong e3e9ad1342
Add devolo blinds devices (#36597)
* add support for devolo blinds

* correct internal sync function

* correct naming

* fix R1719 in line 73:15

* remove 'break point' print

* simplified _sync check

* change comment

* change log msg
2020-08-06 12:14:39 +02:00
Quentame 21f4d694bb
Remove Linky integration (#38565) 2020-08-06 11:18:05 +02:00
Markus Bong 6c5bcbfc3e
Add devolo light devices (#37366) 2020-08-05 18:16:21 +02:00
Aidan Timson caca762088
OVO Energy Integration (#36104)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2020-08-05 14:38:29 +02:00
J. Nick Koston a91f5b7192
Prevent ping integration from blocking startup (#38504) 2020-08-05 12:43:35 +02:00
cgtobi 31dbdff3c4
Add Netatmo data handler (#35571)
* Fix webhook registration

* Only load camera platform with valid scope

* Add initial data handler and netatmo base class

* Update camera to use data handler

* Update init

* Parallelize API calls

* Remove cruft

* Minor tweaks

* Refactor data handler

* Update climate to use data handler

* Fix pylint error

* Fix climate update not getting fresh data

* Update climate data

* update to pyatmo 4.0.0

* Refactor for pyatmo 4.0.0

* Exclude from coverage until tests are written

* Fix typo

* Reduce parallel calls

* Add heating request attr

* Async get_entities

* Undo parallel updates

* Fix camera issue

* Introduce individual scan interval per device class

* Some cleanup

* Add basic webhook support for climate to improve responsiveness

* Replace ClimateDevice by ClimateEntity

* Add support for turning camera on/off

* Update camera state upon webhook events

* Guard data class registration with lock

* Capture errors

* Add light platform

* Add dis-/connect handling

* Fix set schedule service

* Remove extra calls

* Add service to set person(s) home/away

* Add service descriptions

* Improve service descriptions

* Use LightEntity instead of Light

* Add guard if no data is retrieved

* Make services entity based

* Only raise platform not ready if there is a NOC

* Register webhook even during runtime

* Fix turning off event

* Fix linter error

* Fix linter error

* Exclude light platform from coverage

* Change log level

* Refactor public weather sensor to use data handler

* Prevent too short coordinates

* Ignore modules without _id

* Code cleanup

* Fix test

* Exit early if no home data is retrieved

* Prevent discovery if already active

* Add services to (un-)register webhook

* Fix tests

* Not actually a coroutine

* Move methods to base class

* Address pylint comment

* Address pylint complaints

* Address comments

* Address more comments

* Add docstring

* Use single instance allowed

* Extract method

* Remove cruft

* Write state directly

* Fix test

* Add file to coverage

* Move nested function

* Move nested function

* Update docstring

* Clean up code

* Fix webhook bug

* Clean up listeners

* Use deque

* Clean up prints

* Update homeassistant/components/netatmo/sensor.py

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

* Update homeassistant/components/netatmo/sensor.py

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

* Update homeassistant/components/netatmo/sensor.py

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

* Update homeassistant/components/netatmo/sensor.py

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

* Update homeassistant/components/netatmo/sensor.py

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

* Update homeassistant/components/netatmo/sensor.py

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

* Update homeassistant/components/netatmo/camera.py

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

* Update homeassistant/components/netatmo/camera.py

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

* Update homeassistant/components/netatmo/camera.py

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

* Update homeassistant/components/netatmo/camera.py

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

* Update homeassistant/components/netatmo/camera.py

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

* Update homeassistant/components/netatmo/camera.py

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

* Rename data_class variable

* Break when match

* Extract method

* Extract methods

* Rename variable

* Improve comment

* Some refinements

* Extra

* Extract method

* Simplify code

* Improve reability

* Code simplification

* Simplify code

* Simplify code

* Code cleanup

* Fix import

* Clean up

* Clean up magic strings

* Replace data_class_name with CAMERA_DATA_CLASS_NAME

* Replace data_class_name with CAMERA_DATA_CLASS_NAME

* Replace data_class_name with HOMEDATA_DATA_CLASS_NAME

* Replace data_class_name in public weather sensor

* Clean up

* Remove deprecated config options

* Schedule immediate update on camera reconnect

* Use UUID to clearly identify public weather areas

* Use subscription mode

* Move clean up of temporary data classes

* Delay data class removal

* Fix linter complaints

* Adjust test

* Only setup lights if webhook are registered

* Prevent crash with old config entries

* Don't cache home ids

* Remove stale code

* Fix coordinates if entered mixed up by the user

* Move nested function

* Add test case for swapped coordinates

* Only wait for discovery entries

* Only use what I need

* Bring stuff closer to where it's used

* Auto clean up setup data classes

* Code cleanup

* Remove unneccessary lock

* Update homeassistant/components/netatmo/sensor.py

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

* Update tests/components/netatmo/test_config_flow.py

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

* Clean up dead code

* Fix formating

* Extend coverage

* Extend coverage

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-08-04 20:46:46 +02:00
James Hilliard 064cc52ad6
Add config flow to HLK-SW16 (#37190)
* Add config flow to HLK-SW16

* Use entry_id for unique_id

* Add options update capability

* Refactor entry_id under domain

* Remove name from config

* Set options

* Remove options flow

* remove unneccesary else block from validate_input and move domain cleanup to async_unload_entry

* Add tests and config import

* Add back config schema

* Remove config import

* Refactor unload

* Add back config import

* Update coveragerc

* Don't mock validate_input

* Test duplicate configs

* Add import test

* Use patch for timeout test

* Use mock for testing timeout

* Use MockSW16Client for tests

* Check mock_calls count

* Remove unused NameExists exception

* Remove title from strings.json

* Mock setup for import test

* Set PARALLEL_UPDATES for switch

* Move hass.data.setdefault(DOMAIN, {}) to async_setup_entry
2020-08-02 17:52:53 -10:00
Xiaonan Shen e8b6ed5a27
Add platform tests to yeelight (#37745)
* Add platform tests to yeelight

* Update requirements

* Break long string
2020-08-02 16:37:31 +02:00
Maciej Bieniek a57dca1e11
Add sensor platform for AccuWeather integration (#38312)
* Add sensor platform

* Fix typo
2020-08-02 09:22:51 -05:00
Rob Bierbooms af97141f4f
Increase test coverage for rfxtrx integration (#38435)
* Remove rfxtrx from coveragerc

* Tweak binary sensor test

* Tweak light test
2020-08-01 11:26:26 -05:00
Maciej Bieniek ad0560ef37
Improve tests for Airly integration (#38357)
* Add tests

* More tests

* Add PARALLEL_UPDATES

* Change Quality scale to platinum

* Change PARALLEL_UPDATES value
2020-07-30 08:41:18 -10:00
On Freund b226a7183f
Add config flow to Volumio (#38252) 2020-07-27 09:19:19 +02:00
Aidan Timson dcba45e67d
Add Azure DevOps Integration (#33765)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-07-26 00:04:10 +02:00
Maciej Bieniek 581c4a4edd
Add AccuWeather integration (#37166)
* Initial commit

* Fix strings

* Fix unit system

* Add config_flow tests

* Simplify tests

* More tests

* Update comment

* Fix pylint error

* Run gen_requirements_all

* Fix pyline error

* Round precipitation and precipitation probability

* Bump backend library

* Bump backend library

* Add undo update listener on unload

* Add translation key for invalid_api_key

* Remove entity_registry_enabled_default property

* Suggested change

* Bump library
2020-07-24 15:59:15 -05:00
RogerSelwyn 393dd4fe7f
Change sky_hub to async and fix exception spamming (#37129)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-07-22 19:58:07 +02:00
Adam Król bedb0753f3
Add Wolflink integration (#34104)
* WOLF Smart-set integration

* Removed translations. Changed device class of timestamp. Added new test for unknown exception

* Remove unit_of_measurement from hours sensor

* Code cleanup. Pull Request comments fixes

* ConnectError import change. Removed DEVICE_CLASS_TIMESTAMP

* Add unique id guard with tests. Use common translations. Move device_id resolution to config_flow.

* Remove debug print
2020-07-20 11:52:52 +02:00
lawtancool 432cbd3148
Add Control4 integration (#37632)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-07-19 13:48:08 -07:00
Perry Naseck 93919dea88
Add Firmata Integration (attempt 2) (#35591) 2020-07-16 17:58:45 -07:00
Haemish Kyd 8a2b34cc09
Updates to poolsense integration (#37613)
* Created a binary sensor and corrected some review comments.

* Updated the poolsense class and its interface to handle credentials better

* Moved the client session to the PoolSense class.

* Apply suggestions from code review

* Update binary_sensor.py

* Update homeassistant/components/poolsense/__init__.py

* Update sensor.py

* Update binary_sensor.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-07-10 21:53:34 -05:00
cgtobi 155a5f7c26
Add back Netatmo public weather sensors (#34401)
* Add public weather sensors back in

* Remove stale code

* Cleanup after before adding entities

* Fix pylint complaint

* Add test for options flow

* Change mode to listbox

* Update .coveragerc

* Address comments

* Don't process empty list

* Address comment

* Fix mistake

* Make signal unique

* Make string more unique

* Fix merge conflict
2020-07-09 06:39:33 +02:00
jduquennoy af6a4bb6cf
Refactor Enocean part 1 (#35927)
* First step of an EnOcean integration refactoring, including code reorganisation and support of a setup config flow

* Moved title to root of strings file

* Fixed pre-commit checks failures

* Fixed linter errors

* Updated formatted string format in logs

* Removed leftover comment

* Multiple changes after PR change requests.
Using an import flow for yaml config, removed unnecessary logs, added proper unload in __init__ and EnOceanDongle
Replaced config state machine by several flows.
Serial port validity check done in the EnOceanDongle class asynchronously, removed unique ID from config flow
Multiple cosmetic changes

* Multiple changes after PR change requests

* Added variable to store default value, as setdefault was caught returning None when the empty dict literal was passed as an argument

* Literal used directly

* Added tests for EnOcean config flows, changed static methods to bundle methods for bundle

* Updated variable name

* Added missing mock to test, replaced repeated magic strings by constants

* Changed imports to avoid an unused import warning from pylint on DOMAIN

* Adding pylint exception for unused import

* Added proper propagation of setup and unload to platforms, removed dead code, some syntax changes

* Removed setup_entry forwarding as the entities can only be configured using yaml

* Removed forwarding of unload

* Enabled code coverage for config flow only

* Clean up coveragerc

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-07-08 20:46:38 -04:00
Aaron Bach 0067b6a84d
Transition Guardian to use a DataUpdateCoordinator (#37380)
* Migrate Guardian to use the DataUpdateCoordinator

* Finish work

* Cleanup

* Don't use UpdateFailed error

* Code cleanup

* Code cleanup

* Remove unnecessary change

* Code review

* Code review

* Use a subclass of DataUpdateCoordinator

* Make sure to pop client upon unload

* Adjust coverage
2020-07-05 16:09:40 -06:00
Baptiste Candellier 3062312649
Add config flow + async support for SmartHab integration (#34387)
* Setup barebones SmartHab config flow

* Setup authentication flow

* Make setup async, add config flow receivers

* Add French translation

* Fix async issues

* Address review comments (thanks bdraco!)

* Fix unloading entries

* Migrate translations dir according to warning

* Create list of components

* Fix pylint false positive

* Fix bad copy-pastes 🤭

* Add async support to SmartHab component

* Address review comments (bdraco)

* Fix pylint

* Improve exception handling (bdraco)

* Apply suggestions from code review (bdraco)

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

* Don't log exceptions manually, fix error

* Reduce repeated lines in async_step_user (bdraco)

* Remove useless else (pylint)

* Remove broad exception handler

* Create strings.json + remove fr i18n

* Write tests for smarthab config flow

* Test import flow

* Fix import test

* Update homeassistant/components/smarthab/config_flow.py

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

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-07-05 14:20:51 -05:00
Eugene Prystupa 80aebcc7d2
Add more unit tests for plum_lightpad (#37275)
* add more unit tests for plum_lightpad

* add more unit tests for plum_lightpad

* add more unit tests for plum_lightpad

* add more unit tests for plum_lightpad

* Update tests/components/plum_lightpad/test_init.py

apply suggested way to invoke async_setup_entry

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update tests/components/plum_lightpad/test_init.py

apply suggested way to invoke async_setup_entry

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update tests/components/plum_lightpad/test_init.py

apply suggested way to invoke async_setup_entry

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update tests/components/plum_lightpad/test_init.py

remove now unused import

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update tests/components/plum_lightpad/test_init.py

import Mock from tests.async_mock as suggested

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update tests/components/plum_lightpad/test_init.py

remove now unused import

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update tests/components/plum_lightpad/test_init.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* fix unit tests that were failing after suggested changes

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-07-03 16:40:17 -05:00
Haemish Kyd 10786bbe7f
Create PoolSense integration (#35561)
* Created integration for PoolSense - a device to maintain your pool

* Updated poolsense integration with changes due to code review comments.

* Update poolsense with lint fix (logging-not-lazy)

* Update poolsense with lint fix (f string missing placeholders)

* Update homeassistant/components/poolsense/config_flow.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/poolsense/sensor.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/poolsense/sensor.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/poolsense/sensor.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/poolsense/sensor.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/poolsense/sensor.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/poolsense/sensor.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/poolsense/sensor.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/poolsense/sensor.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/poolsense/sensor.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/poolsense/strings.json

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/poolsense/strings.json

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/poolsense/strings.json

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/poolsense/strings.json

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Added test for poolsense component. Updated config_flow to better follow the guidelines.

* Update tests/components/poolsense/test_config_flow.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update tests/components/poolsense/test_config_flow.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update tests/components/poolsense/test_config_flow.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update tests/components/poolsense/test_config_flow.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update tests/components/poolsense/test_config_flow.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update tests/components/poolsense/test_config_flow.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update tests/components/poolsense/test_config_flow.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update tests/components/poolsense/test_config_flow.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Removed uneccessary functions.

* Added local venv to gitignore

* Update homeassistant/components/poolsense/strings.json

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/poolsense/strings.json

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/poolsense/strings.json

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/poolsense/strings.json

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/poolsense/strings.json

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/poolsense/strings.json

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update to strings to allow for translations. Also some coding convention updates.

* Removed space in icon return

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Removed space in icon return

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Removed space in icon return

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/poolsense/__init__.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/poolsense/__init__.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/poolsense/__init__.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/poolsense/strings.json

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Updated to include some error checks for pypi package

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

* Update tests/components/poolsense/test_config_flow.py

* Update homeassistant/components/poolsense/sensor.py

* Apply suggestions from code review

* Update homeassistant/components/poolsense/__init__.py

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

* Update homeassistant/components/poolsense/sensor.py

* Apply suggestions from code review

* Update homeassistant/components/poolsense/__init__.py

* Update homeassistant/components/poolsense/sensor.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-07-01 00:44:10 -05:00
Eugene Prystupa 7ef33a7219
Add first unit test to config flow for Plum Lightpad (#37183)
* add first unit test to config flow for Plum Lightpad

* add first unit test to config flow for Plum Lightpad (add changed requirements_test_all.txt)

* add first unit test to config flow for Plum Lightpad

* add first unit test to config flow for Plum Lightpad (bring coverage to 100%)

* add first unit test to config flow for Plum Lightpad

* add first unit test to config flow for Plum Lightpad (updated patch path as suggested)

* add first unit test to config flow for Plum Lightpad (add unit test for abort)
2020-06-29 18:07:43 +02:00
mdegat01 b96ce9c210
Additional testing for InfluxDB and some quality improvements (#37181)
* refactoring and added tests to sensor

* using caplog and not mocking main setup method in sensor tests
2020-06-29 17:31:49 +02:00
Markus Bong 35dc5ba742
Add devolo sensor devices (#37049) 2020-06-24 10:06:11 -07:00
bsmappee fbd5ccf156
Add smappee binary_sensor platform (#37023) 2020-06-24 14:37:48 +02:00
mdegat01 6c7355785a
Add support for glob matching to entity filters (#36913)
* Added GLOB capability to entityfilter and every place that uses it. All existing tests are passing

* added tests for components affected by glob change

* fixed flake8 error

* mocking the correct listener

* mocking correct bus method in azure test

* tests passing in 3.7 and 3.8

* fixed formatting issue from rebase/conflict

* Checking against glob patterns in more performant way

* perf improvments and reverted unnecessarily adjusted tests

* added new benchmark test around filters

* no longer using get with default in entityfilter

* changed filter name and removed logbook from filter benchmark

* simplified benchmark tests from feedback

* fixed apache tests and returned include exclude schemas to normal

* fixed azure event hub tests to properly go through component logic

* fixed azure test and clean up for other tests

* renaming test files to match standard

* merged mqtt statestream test changes with base

* removed dependency on recorder filter schema from history

* fixed recorder tests after merge and a bunch of lint errors
2020-06-23 20:02:29 -05:00
Thomas Le Gentil 2af961513d
Remove fortigate integration (#34586) 2020-06-24 00:21:51 +02:00
Franck Nijhof 8b21b415c4
Fix/Rewrite of Toon integration (#36952)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-06-22 18:22:41 -07:00
Franck Nijhof 6660cf701d
Remove lockitron integration (#37012) 2020-06-22 16:34:26 -06:00
rajlaud 3f427602ba
Squeezebox config flow (#35669)
* Squeezebox add config flow and player discovery

* Fixes to config flow

* Unavailable player detection and recovery

* Improved error message for auth failure

* Testing for squeezebox config flow

* Import configuration.yaml

* Support for discovery integration

* Internal server discovery

* Fix bug restoring previously detected squeezebox player

* Tests for user and edit steps in config flow

* Tests for import config flow

* Additional config flow tests and fixes

* Linter fixes

* Check that players are found before iterating them

* Remove noisy logger message

* Update requirements_all after rebase

* Use asyncio.Event in discovery task

* Use common keys in strings.json

* Bump pysqueezebox to v0.2.2 for fixed server discovery using python3.7

* Bump pysqueezebox version to v0.2.3

* Don't trap AbortFlow exception

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

* Refactor validate_input

* Update squeezebox tests

* Build data flow schema using function

* Fix linter error

* Updated en.json

* Update homeassistant/components/squeezebox/media_player.py

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

* Update homeassistant/components/squeezebox/media_player.py

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

* Update homeassistant/components/squeezebox/media_player.py

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

* Update homeassistant/components/squeezebox/media_player.py

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

* Update .coveragerc for squeezebox config flow test

* Mock TIMEOUT for faster testing

* More schema de-duplication and testing improvements

* Apply suggestions from code review

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

* Testing and config flow improvements

* Remove unused exceptions

* Remove deprecated logger message

* Update homeassistant/components/squeezebox/media_player.py

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

* Implement suggestions from code review

* Add async_unload_entry

* Use MockConfigEntry in squeezebox tests

* Remove unnecessary config schema

* Stop server discovery task when last config entry unloaded

* Improvements to async_unload_entry

* Fix bug in _discovery arguments

* Do not await server discovery in async_setup_entry

* Do not await start server discovery in async_setup

* Do not start server discovery from async_setup_entry until homeassistant running

* Re-detect players when server removed and re-added without restart

* Use entry.entry_id instead of unique_id

* Update unittests to avoid patching homeassistant code

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-06-22 09:29:01 -05:00
starkillerOG 1f9721bad3
Add Xiaomi Aqara Config Flow (#35595)
* Xiaomi Aqara Config Flow

* Xiaomi Aqara Config Flow

* Xiaomi Aqara Config Flow

* Xiaomi Aqara Config Flow

* Xiaomi Aqara Config Flow

First tested and working version

* Remove depricated discovery

* Add Xiaomi Aqara Config Flow

* Add Xiaomi Aqara tests

* Update .coveragerc

* Update requirements_test_all.txt

* fix spelling mistake

* fix select scheme

* fix wrong conflict resolve

* add IP to zeroconf discovery title

* black styling

* add getmac requirement

Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com>

* add getmac

* add getmac

* Clean up

* Update homeassistant/components/xiaomi_aqara/__init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/xiaomi_aqara/__init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/xiaomi_aqara/__init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/xiaomi_aqara/__init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/xiaomi_aqara/__init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* resolve data storage

* move format_mac down

* Remove discovery_retry from config flow

* remove unused strings

* fix styling

* fix black styling

* fix tests

* remove mac connection

This is needed to prevent a conflict with the Xiaomi Miio integration that I discovered during testing.

* fix flake8

* remove getmac depandance

* check for inavlid_interface + test

* Validate gateway key

* add invalid key tests

* Fix spelling

* Only set up sensors if no key

Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-22 11:54:17 +02:00
bsmappee 5228282f69
Renew Smappee (sensors and switches) (#36445)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-17 13:28:28 +02:00
starkillerOG 6db5ff98ed
DenonAVR Config Flow (#35255)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-16 14:46:39 +02:00
Philip Allgaier 25607c7129
Use MDI CPU icon for glances (#36736)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-16 14:44:37 +02:00
Kevin Fronczak a68af0a3a9
Add blink tests (#36672)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-16 11:05:33 +02:00
Tom Schneider 0331ebdd47
Add HVV integration (Hamburg public transportation) (#31564)
Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-15 00:15:20 +02:00
Markus Bong 3495932eb0
Add devolo binary_sensor devices (#36370)
* initial commit

* small corrections

* fix linting error

* add new files to coveragerc

* rename devolo_sensor to devolo_device

* use correct import

* use binary_switch platform

* use binary_switch platform

* add binary_sensor to coverage

* adjustments according PR review

* make super call easier to read

* use f-string instead of concatenating

* update docstrings - remove device_id property

* add will_remove_from_hass
2020-06-06 10:10:05 -05:00
Tim van Cann d73a4e1ed5
Add Avri config flow (#34288)
* Add config flow to Avri integration

* Add config flow validation

* Update .coveragerc

* Start adding config flow tests

* Fix failing test

* Fix pylint

* Update homeassistant/components/avri/config_flow.py

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

* Update homeassistant/components/avri/config_flow.py

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

* Fix import order

* Code review comments

* Update homeassistant/components/avri/sensor.py

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

* Remove device information

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-06-06 09:37:31 -05:00
Alexey Kustov 3076fc5f25
Add notify_events notify integration (#36049)
* Add new notify_events notification component

* Fix manifest

* Formatting fix

* Black formatting + CODEOWNERS

* Fix requirements_all.txt

* Flake8 warning fix

* Isort fixes

* Update notify-events library requirement version

* Replace Exception to more suitable and update lib version

* Reformat integration according to "0007-integration-config-yaml-structure.md"

* Update homeassistant/components/notify_events/manifest.json

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Fix manifest + remove async

* Black formatting

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-05 21:26:56 +02:00
Aaron Bach 7a3c2e1f6c
Add config flow for Tile (#36173)
* Overhaul Tile

* Adjust coverage

* Fix tests

* Code review

* Code review

* Remove unused config flow step

* Revert "Remove unused config flow step"

This reverts commit cb206e0446.

* Fix tests
2020-06-04 10:07:27 -06:00
Maciej Bieniek 465b98513b
Add config flow to Dune HD (#36345)
* Add config_flow to the dunehd integration

* Add tests

* Run gen_requirements_all

* Fix pylint error

* Better hostname validation

* Build device info in the class
2020-06-03 07:01:56 -05:00
Tom 61c08e792d
Update plugwise to async and config_flow switch part (#36383)
* Add switch component

* Update homeassistant/components/plugwise/switch.py

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

* Update homeassistant/components/plugwise/switch.py

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

* Improvements by @bdraco

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-06-02 14:45:14 -05:00
Franck Nijhof 08566f84cd
Remove wunderlist, platform is decommissioned (#36380) 2020-06-02 19:37:52 +02:00
Tom c68e0a1d46
Update plugwise to async and config_flow binary_sensor part (#36378)
* Add binary_sensor component

* Version bump

* Blushing commit - tnx @bdraco
2020-06-02 11:30:00 -05:00
Quentame 26cbca101a
Refactor Synology entries to allow not fetching the API when it's disabled + add security binary sensor (#35565)
- add Synology DSM Security binary sensor (enabled by default)
- use device name instead of id in names
- add device type to name
- show disk manufacturer, model and firmware version in devices
- some entries are disabled by default (`entity_registry_enabled_default`)
- binary sensor + sensor uses `device_class` when possible
- do not fetch a concerned API if all entries of it are disabled
- entity unique_id now uses key instead of label
- entity entity_id changes for disk and volume: example from `sensor.synology_status_sda` to `sensor.synology_drive_1_status`, or from `sensor.synology_average_disk_temp_volume_1` to `sensor.synology_volume_1_average_disk_temp`
- now binary sensor:
  - disk_exceed_bad_sector_thr
  - disk_below_remain_life_thr
- removed sensor:
  - volume type (RAID, SHR ...)
  - disk name (Drive [X])
  - disk device (/dev/sd[Y])
2020-06-02 18:22:51 +02:00
Franck Nijhof e5d81aeb2a
Remove gearbest integration (ADR-0004) (#36347) 2020-06-01 17:43:20 +02:00
Tom d0fedad000
Update plugwise to async and config_flow sensor part (#36219)
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-06-01 14:01:17 +02:00
Barry Williams b6407f77da
Add service to openhome to invoke a pin (#31119)
Setup platform async
Use entity services
Store UUID in default data rather than entity
2020-05-30 14:40:35 +02:00
Chris Talkington 940249f45e
Refactor Sonarr Integration (#33859)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-05-29 17:08:05 -07:00
Tom 7e693afcf3
Update plugwise to async and config_flow (#33691)
* Update plugwise async, config_flow and multi entity

* Update battery percentage

* Fix yamllint on services

* Fix yamllint on services

* Fix formatting for pyupgrade

* Update homeassistant/components/plugwise/__init__.py

Co-Authored-By: Robert Svensson <Kane610@users.noreply.github.com>

* Add try/except on setup

* Bump module version, battery version and valve position

* Removing sensor, switch, water_heater for later (child) PRs

* Catchup and version bump

* Remove title from strings.json

* Readd already reviewd await try/except

* Readd already reviewed config_flow

* Fix pylint

* Fix per 0.109 translations

* Remove unused import from merge

* Update plugwise async, config_flow and multi entity

* Update battery percentage

* Fix yamllint on services

* Fix yamllint on services

* Bump module version

* Bump module version, battery version and valve position

* Removing sensor, switch, water_heater for later (child) PRs

* Catchup and version bump

* Remove title from strings.json

* Fix pylint

* Fix per 0.109 translations

* Translations and config_flow, module version bump with required changes

* Translations and config_flow, module version bump with required changes

* Fix requirements

* Fix requirements

* Fix pylint

* Fix pylint

* Update homeassistant/components/plugwise/__init__.py

Improvement

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

* Update homeassistant/components/plugwise/__init__.py

Improvement

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

* Update homeassistant/components/plugwise/__init__.py

Improvement

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

* Include configentrynotready on import

* Update __init__.py

* DataUpdateCoordinator and comment non-PR-platforms

* Fix reqs

* Rename devices variable in favor of entities

* Rework updates with DataUpdateCoordinator

* Peer review

* Peer review second part

* Cleanup comments and redundant code

* Added required config_flow test

* Peer review third part

* Update service was replaced by DataUpdateCoordinator

* Corrected testing, version bump for InvalidAuth, move uniq_id

* Remove according to review

* Await connect (py38)

* Remove unneccesary code

* Show only when multiple

* Improve config_flow, rename consts

* Update homeassistant/components/plugwise/climate.py

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

* Update homeassistant/components/plugwise/climate.py

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

* Process review comments

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-28 10:52:25 -05:00
Aaron Bach 369745c4cf
Add support for Elexa Guardian water valve controllers (#34627)
* Add support for Elexa Guardian water valve controllers

* Zeroconf + cleanup

* Sensors and services

* API registration

* Service bug fixes

* Fix bug in cleanup

* Tests and coverage

* Fix incorrect service description

* Bump aioguardian

* Bump aioguardian to 0.2.2

* Bump aioguardian to 0.2.3

* Proper entity inheritance

* Give device a proper name

* Code review
2020-05-26 08:47:25 -05:00
MatsNl 67a9622209
Add tests to Atag integration (#35944)
* add tests

* better error handling in dependency

* dont suppress errors

* add support for multiple devices

* add test for Unauthorized status

* raise error on service call failure
2020-05-26 08:38:02 +02:00
Aaron Bach 05cbb3f0e4
Remove WWLLN integration (#35926) 2020-05-25 22:34:51 +02:00
braam 1f3d3c3e5b
Add Unify Circuit (#35756) 2020-05-25 15:51:41 +02:00
Martin Hjelmare cc369cd461
Fix lutron_caseta setup options (#35974) 2020-05-22 23:01:48 +02:00
Jason Hunter 8cd905487e
Bump pyAV and close unclosed outputs (#35960)
* bump pyAV and close unclosed outputs

* skip stream from coverage for now

* fix divide by zero error
2020-05-22 18:13:37 +02:00
Alan Murray 65e509ed8f
Add Acmeda integration (#33384)
* First cut of Rollease Acmeda Pulse Hub integration.

* Acmeda integration improvements:
 - Moved common code into a base entity
 - Battery level sensor added
 - Localisation now working

* Added requirement for aiopulse now that it has been uploaded to PyPI.

* Exclude acmeda integration from coverage check as it relies on a hub being present.

* Fix Travis CI build issues.

* Remove unused constants.

* Remove unused group logic from cover.py

* Removed commented code from base.py

* Remove sensors (battery entities) on removal of hub.

* Remove unused groups from sensor.py

* Acmeda device and entity update made fully asynchronous using subscriptions to remove need for config polling.

* Updated aiopulse version dependency.
Removed non-functional battery charging indication.

* Rationalised common code to update entities into helpers.py

* Fix linting issue.

* Correct additional CI pylint errors.

* Index config_entries by entry_id.
Move entity loading and unloading to __init__.py
Add entry_id to dispatcher signal
Removed now unused polling code hub
Added config_flow unit tests

* Tweak to integration config_entry title.

* Bumped aiopulse module to 0.3.2.
Reduced verbosity of aiopulse module.

* Changed to using direct write of device state.
Removed old style async_step_init config_flow step.

* Remove superfluous battery_level and device_state_attributes from battery entity.

* Removal of unused strings.
Removal of unused create_config_flow helper.
Removal of stale comment.

* Remove use of shared container to track existing enities.
Moved removal and deregistration of entities to base class through use of dispatch helper.

* Fixed strings.json

* Fix incorrect use of remove instead of pop on dict.

* Add support for tilting covers, bump aiopulse version number.

* Bump aiopulse version to v0.3.4.
Fixed bug in cover supported_features.

* Bumped aiopulse version to 0.4.0
Update acmeda .coveragerc exclusions

* Removed already configured hub check from __init__.py async_setup_entry
Removed passing in hass reference to base entity class
Renamed entity async_reset to async_will_remove_from_hass
Changed device_info and properties
Migrated to CoveEntity from CoverDevice
Added dispatched_connect cleanup on hub removal
Removed unused entries from manifest
Removed override of battery icon
Renamed translations folder

* Reversed unintended change to .coveragerc

* Fixed config flow for multi-hub discovery.

* Acmeda enhancements as requested by MartinHjelmare

* Force import to connect to hub to retrieve id prior to creating entry

* Remove YAML configuration support.

* Tidied up config_flow and tests:
 - removed unnecessary steps
 - fixed typos

* Removed storage of hub in config_flow.
2020-05-17 12:15:06 +02:00
Robert Van Gorkom 11b786a4fc
Add config flow to gogogate2 component (#34709)
* Add config flow to gogogate2 component.

* Using a more stable gogogate api.

* Getting config flows working better by using different downstream library.

* Fixing options not getting default values.
Adding availability to cover entity.

* Simplifying return types of function.

* Address PR feedback.

* Making user config flow not abort.

* Using DataUpdateCoordinator.

* Addressing PR feedback.

* Using standard method for using hass.data

* Split auth fail test into separate tests.
2020-05-16 10:53:11 -05:00
Franck Nijhof 0be20ec6ab
Rename zwave_mqtt to ozw (#35631) 2020-05-14 22:56:04 +02:00
Franck Nijhof c67d035366
Rename zigbee to xbee (#35613) 2020-05-14 12:19:59 +02:00
Aaron Bach c9b702c4c2
Remove Automatic integration (#35029) 2020-05-14 11:24:22 +02:00
J. Nick Koston 6d8b8ecfa9
Add ssdp discovery for isy994 (#35568)
* Add ssdp discovery for isy994

* Increase test coverage for existing config flow

* Update tests/components/isy994/test_config_flow.py

Co-authored-by: shbatm <support@shbatm.com>

* Update tests/components/isy994/test_config_flow.py

Co-authored-by: shbatm <support@shbatm.com>

* move constants

* Update tests/components/isy994/test_config_flow.py

Co-authored-by: shbatm <support@shbatm.com>

* undo CONF_TLS_VER from homeassistant.const

Co-authored-by: shbatm <support@shbatm.com>
2020-05-13 11:15:17 -05:00
Steffen Zimmermann ee96ff2846
Add wiffi integration (#30784)
* Add integration for wiffi devices

wiffi devices are DIY board manufactured by stall.biz.
Several devices are available, e.g. a weather station (weatherman), an
indoor environmental sensor (wiffi-wz) and some more.
This intgration has been developed using a weatherman device, but should
also work for other devices from stall.biz.

* Fix pylint warning

* Use WIFFI / STALL WIFFI instead of wiffi to be consistent with stall.biz

* Don't update disabled entities.

* fix complains

- move wiffi specific code to pypi
- remove yaml configuration code

* incorporate various suggestions from code review

* fix remaining comments from Martin

* fix comments

* add tests for config flow

* fix comments

* add missing requirements for tests

* fix pylint warnings

* fix comments

* fix comments

remove debug log
rename .translations to translations

* rebase and adapt to latest dev branch

* Update homeassistant/components/wiffi/config_flow.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/wiffi/config_flow.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* fix missing import

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-05-13 10:40:58 +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
Emily Mills 306f15723d
Add Zerproc integration (#35477) 2020-05-13 00:26:44 +02:00
Jason Hunter 132bb4e890
ONVIF Event Implementation (#35406)
Initial implementation of ONVIF event sensors
2020-05-11 13:12:12 -04:00
Daniel Høyer Iversen f302c6fd65
Add Mill config flow (#35136)
* Mill config, wip

* add tests

* fix merge

* update tests

* unique id

* Mill strings

* mill config flow

* mill config flow

* test import

* test import

* req

* ccoverage

* Apply suggestions from code review

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

* style

* Apply suggestions from code review

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* update strings

* add test

Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-05-10 08:44:05 -05:00
Xiaonan Shen 8994931ec4
Songpal code and test improvement (#35318)
* Use tests.async_mock instead of asynctest

* Remove unnecessary existence check

* Improve songpal service registering

* Add tests

* Seperate device api from entity api

* Improve disconnect log messages

* Improve tests

* Rename SongpalDevice to SongpalEntity

* Improve reconnecting

* Remove logging and sleep patch from tests

* Test unavailable state when disconnected

* Rename SongpalEntity.dev to _dev

* Add quality scale to manifest
2020-05-09 22:30:34 -04:00
Willem-Jan cf30895460
Add BSBLan Climate integration (#32375)
* Initial commit for BSBLan Climate component

The most basic climate functions work.

* Delete manifest 2.json

wrongly added to commit

* fix incorrect name

current_hvac_mode

* update coverage to exclude bsblan

* sorted and add configflow

* removed unused code, etc

* fix hvac, preset  mix up

now it sets hvac mode to none and preset to eco

* fix naming

* removed commented code and cleaned code that isn't needed

* Add test for the configflow

* Update requirements

fixing some issues in bsblan Lib

* Update coverage file to include configflow bsblan

* Fix hvac preset is not in hvac mode

rewrote how to handle presets.

* Add passkey option

My device had a passkey so I needed to push this functionality to do testing

* Update constants

include passkey and added some more for device indentification

* add passkey for configflow

* Fix use discovery_info instead of user_input

also added passkey

* Fix name

* Fix for discovery_info[CONF_PORT] is None

* Fix get value CONF_PORT

* Fix move translation to new location

* Fix get the right info

* Fix remove zeroconf and fix the code

* Add init for mockConfigEntry

* Fix removed zeroconfig and fix code

* Fix changed ClimateDevice to ClimatEntity

* Fix log error message

* Removed debug code

* Change name of device.

* Remove check

This is done in the configflow

* Remove period from logging message

* Update homeassistant/components/bsblan/strings.json

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Add passkey

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-05-09 22:16:21 -04:00
Brynley McDonald e2b622fb78
Add Flick Electric NZ integration (#30696)
* Add integration for Flick Electric NZ

* Start adding Config Flow and external API

* Second Wave of Config Flow and API implementation

* Fix test (errors is None instead of blank array?)

* Don't update sensor if price is still valid

* Add input validation

* Fix linting for DOMAIN

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Remove platform schema (config is by entries only)

* Don't catch AbortFlow exception

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update test

* Re-arrange try-catch in config flow

* Fix linting in sensor.py

* Staticly define list of components

* Fix test exceptions

* Fix _validate_input not being awaited

* Fix tests

* Fix pylint logger

* Rename test and remove print debug

* Add test for duplicate entry

* Don't format string in log function

* Add tests __init__ file

* Remove duplicate result assignment

* Add test for generic exception handling

* Move translations folder

* Simplify testing

* Fix strings/translation

* Move to "flick_electric" as domain

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-05-09 22:13:06 -04:00
Chris Talkington 06ddda8c95
Improve roku remote (#35419)
* Update remote.py

* Create test_remote.py

* Update .coveragerc
2020-05-09 16:04:37 -05:00
Glenn Waters 9353169203
Universal Powerline Bus Scene support (#35401)
* Universal Powerline Bus Scene support.

* Omint UPB scene.py

* Fix lint errors, rename .translations, Light->LightEntity.

* Add rounding to brightness to percent calcs.
2020-05-08 21:42:23 -05:00
Glenn Waters efb52961f0
Add Universal Powerline Bus (#34692)
* Initial version.

* Tests.

* Refactored tests.

* Update requirements_all

* Increase test coverage. Catch exception.

* Update .coveragerc

* Fix lint msg.

* Tweak test (more to force CI build).

* Update based on PR comments.

* Change unique_id to use stable string.

* Add Universal Powerline Bus "link" support.

* Fix missed call.

* Revert botched merge.

* Update homeassistant/components/upb/light.py

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

* Three changes.

Update service schema to require one of brightness/brightness_pct.
Fix bug in setting brightness to zero.
Replace async_update_status and replace with async_update.

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-08 15:00:47 -05:00
Markus Bong 62f2520ee1
Fix devolo switch on and off (#35357)
* use correct API set methods

* add devolo_home_control to coveragerc except config_flow.py
2020-05-08 21:41:56 +02:00
sean tearney 1be41b9de8
Add agent_dvr integration (#32711)
* initial

* add missing fixture

* fix mocks

* fix mocks 2

* update coverage

* fix broken sync between agent and integration

* Update homeassistant/components/agent_dvr/camera.py

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

* Update homeassistant/components/agent_dvr/camera.py

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

* Update homeassistant/components/agent_dvr/camera.py

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

* Update homeassistant/components/agent_dvr/camera.py

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

* updates for review

* add back in should poll again

* revert motion detection enabled flag in state attributes

* Update homeassistant/components/agent_dvr/camera.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/agent_dvr/camera.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/agent_dvr/camera.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/agent_dvr/camera.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/agent_dvr/__init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/agent_dvr/camera.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/agent_dvr/camera.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/agent_dvr/camera.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* add is_streaming

* fix is_streaming bug, remove mp4 stream

* cleanup

Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-05-08 09:49:47 -05:00
Jesse Hills e696c08db0
Rewrite JuiceNet for async and config flow (#34365)
* Add config flow to JuiceNet

* Fix some lint issues

* Fix imports

* Abort on reconfigure / Allow multiple accounts
Abort on bad API token
Fix strings

* Remove unused variable

* Update strings

* Remove import

* Fix import order again

* Update imports
Remove some unused parameters

* Add back ignore

* Update config_flow.py

* iSort

* Update juicenet integration to be async

* Update coverage for juicenet config flow

* Update homeassistant/components/juicenet/entity.py

Co-Authored-By: J. Nick Koston <nick@koston.org>

* Black

* Make imports relative

* Rename translations folder

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-08 00:52:20 -05:00
J. Nick Koston 502afbe9c2
Delete flapping automatic tests (#35356) 2020-05-07 21:25:17 -07:00
Xiaonan Shen 33077f0cdd
Add config flow support to songpal integration (#34714)
* Add config flow to songpal

* Add config flow to songpal

* Add songpal to migrated service in discovery

* Improve songpal/set_sound_setting service

* Remove songpal config flow from .coveragerc omit

* Bump python-songpal to 0.12 and fix exception handling

* Revert "Improve songpal/set_sound_setting service"

This reverts commit 9be076ab52e21f268322572c36709a17d41db771.

* Code style fix

* Add connections to device_info

* Fix pylint

* Ignore braava tv

* Fix test warning

* Add @shenxn as codeowner

* Remove model from configuration data

* Get name from device in user step

* Add unload entry support

* Delete translations as it will get generated as part of CI

* Code cleanup

* Fix typo

* Remove _show_setup_form

* Change configuration from media_player to songpal

Co-authored-by: Raman Gupta <7243222+raman325@users.noreply.github.com>
2020-05-07 00:52:33 +02:00
Jason Hunter 19734e7b2c
Refactor ONVIF (#35222) 2020-05-06 09:29:59 -07:00