Commit Graph

3730 Commits (e099d57bdec79c3b92daf12f0a621d993ff55982)

Author SHA1 Message Date
Franck Nijhof 52ed9608e2 Migrate input_* tests from coroutine to async/await (#30336) 2020-01-01 01:22:44 +01:00
Josh Bendavid fc23b4f83f Migrate webostv to new library and make integration async with callback state updates (#29296)
* migrate webostv to new aiopylgtv version of the library and add support
for generic commands, input/button commands, and callback state updates

* update requirements

* cleanup and bump aiopylgtv version

* update webostv unit tests

* make webostv unit tests work with python 3.7

* cleanup for code checks

* cleanup and code review

* make all client request functions coroutines

* make host required for webostv configuration

* remove generic command and button functionality plus related cleanup

* fix previous track function

* update unit tests

* fix imports for unit tests

* update unit test

* further unit test updates

* remove unnecessary setup call in unit tests

* restore previous behaviour with client key config file in hass configuration directory
2020-01-01 00:26:35 +01:00
Franck Nijhof af153521dc Migrate emulated_hue tests from coroutine to async/await (#30331) 2019-12-31 16:50:07 -06:00
Franck Nijhof 194cb8dbf5 Migrate xiaomi_miio tests from coroutine to async/await (#30329) 2019-12-31 16:49:00 -06:00
Franck Nijhof 2ac5537495 Migrate alexa tests from coroutine to async/await (#30332) 2019-12-31 16:48:17 -06:00
Franck Nijhof 0280862780 Migrate api tests from coroutine to async/await (#30338) 2019-12-31 22:58:40 +01:00
Franck Nijhof 687a052d40 Migrate python_script tests from coroutine to async/await (#30335) 2019-12-31 22:48:43 +01:00
Franck Nijhof cd8f954a4d Migrate wunderground tests from coroutine to async/await (#30330) 2019-12-31 21:04:24 +01:00
Franck Nijhof 30dbed3f98 Migrate dsmr tests from coroutine to async/await (#30333) 2019-12-31 21:03:21 +01:00
Franck Nijhof 2620a95944 Improve Withings tests in different time zone (#30326)
* Improve Withings tests in different time zone

* Address code review comment

* Spelling error in code doc
2019-12-31 11:10:39 -05:00
Alexei Chetroi a3061bda60 Make the rest of ZHA platforms to use ZHA class registry (#30261)
* Refactor ZHA component tests fixtures.

* Add tests for ZHA device discovery.

* Refactor ZHA registry MatchRule.

Allow callables as a matching criteria.
Allow sets for model & manufacturer.

* Minor ZHA class registry refactoring.

Less cluttered strict_matching registrations.

* Add entities only if there are any.

* Migrate rest of ZHA platforms to ZHA registry.

* Pylint fixes.
2019-12-31 11:09:58 -05:00
Iulius 1c2618d99a Add separate command and state topics for mqtt lock (#29808)
* Update lock.py

Allow different command and state topic + different command and state values.

* Formatting updated after black run

* TC updated to reflect different state & cmd values

* Abbreviations for lock states added

* additional non-default state test

* whitespaces fixed

* black formatting run
2019-12-31 15:24:09 +01:00
Issac 3f570245aa Add local_ip component (#29973)
* Added localip component

* Split config and core logic, and migrate to sensor platform (requested by @MartinHjelmare)
Also allow overriding the sensor name via the config

* Tweak docstring

Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>

* Initial support for config entries

* Rename localip to local_ip (1/2)

* Rename localip to local_ip (2/2)

* Add test for config_flow

* Split and rename tests

* Remove unneeded code from config_flow

* Implement configuration as config entry import.  Other misc requested changes from code review.

* Fix tests

* minor code review fixes

* remove unneeded code

Co-authored-by: Fabian Affolter <mail@fabian-affolter.ch>
2019-12-31 14:34:53 +01:00
Franck Nijhof 5414e9d155 Fix Withings leaking time zone change into other tests (#30320)
* Fix Withings leaking time zone change in other tests

* Fix spelling error in code doc
2019-12-31 14:30:09 +01:00
Paulus Schoutsen bb14a083f0
Store capabilities and supported features in entity registry, restore registered entities on startup (#30094)
* Store capabilities and supported features in entity registry

* Restore states at startup

* Restore non-disabled entities on HA start

* Fix test

* Pass device class from entity platform

* Clean up restored entities from state machine

* Fix Z-Wave test?
2019-12-31 14:29:43 +01:00
Maciej Bieniek 2c1a7a54cd Add GIOS integration (#28719)
* Initial commit

* Add gios to requirements

* Add tests

* Update .coveragerc file

* Run gen_requirements_all.py

* Change DEFAULT_SCAN_INTERVAL

* Better strings

* Bump library version

* run script.hassfest

* run isort

* Add icons mapping

* Remove unnecessary f-string

* Remove unnecessary listener

* Refactoring config_flow

* Add unique_id to config entry

* Change AQI states to consts in English

* Remove unused init

* Remove unused exception

* Remove private instance attribute

* Remove overwrite state property

* Fix pylint error

* Add SCAN_INTERVAL for air_quality entity

* Add _abort_if_unique_id_configured()
2019-12-31 13:05:31 +01:00
Robert Svensson 41d2d1f309 Handle wired bug on restart (#30276) 2019-12-30 12:40:52 -06:00
Fabian Affolter d0c9a42b81
Add custom validator for countries (#30280) 2019-12-30 17:51:25 +01:00
Jc2k fccb13b762
Add homekit_controller service.sensor.smoke (#30269) 2019-12-30 08:05:49 +00:00
Jc2k 8a22a38353
Accept homekit_controller pairing codes both with and without dashes (#30273)
* Handle MalformedPinError from homekit_python
* Handle both formats of pin codes
2019-12-30 07:36:01 +00:00
Robert Van Gorkom 08af989658 Fixing timezone issue which caused wrong selection of data to be used. (#30011) 2019-12-28 21:25:37 +01:00
Paulus Schoutsen 5a9e543087
Whitelist Android/iOS auth callbacks (#30082)
* Whitelist Android/iOS

* Add iOS alternate flavor URLs

* Update indieauth.py

Co-authored-by: Robbie Trencheny <me@robbiet.us>
2019-12-28 21:20:18 +01:00
SukramJ 658ec309aa Add HmIP-MOD_TM to HomematicIP Cloud (#30255) 2019-12-28 16:29:14 +01:00
ochlocracy 25f78dd1a9
Implement EqualizerController in Alexa for media_player. (#30159) 2019-12-24 17:06:39 -05:00
Alan Tse 3aa2ae1700 Enable config flow for Tesla (#28744)
* build: bump teslajsonpy to 0.2.0

* Remove tests

* feat: add config flow

* feat: add async

* perf: convert unnecessary async calls to sync

* feat: add charger voltage and current sensor

* feat: add options flow

* build: bump teslajsonpy to 0.2.0

* Remove icon property

* Revert climate mode change

* Remove charger sensor

* Simplify async_setup_platform

* Update homeassistant/components/tesla/sensor.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Update homeassistant/components/tesla/binary_sensor.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Address requested changes

* Fix pylint error

* Address requested changes

* Update codeowners

* Fix pylint error

* Address requested changes

* Address requested change

* Remove unnecessary check for existing config entry

* Load scan_interval in async_setup_entry

* Include coverage of config_flow

* Add tests for full coverage

* Address requested test changes

* Remove unnecessary init lines

* Remove unnecessary init

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2019-12-23 21:54:25 +01:00
Claudio Heckler edce497a0d New date_time_utc display option added to the time_date sensor platform (#30158) 2019-12-23 21:48:24 +01:00
ochlocracy a2678b2aff Add support for input_number entities in Alexa integration (#30139)
* Add support for input_number entities

* Update homeassistant/components/alexa/capabilities.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Removed get methods to directly access required attributes dicts.

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2019-12-23 15:17:37 +01:00
Franck Nijhof d101d4449f Fix deconz SSDP updating Hassio discovery (#30153) 2019-12-22 22:24:18 +01:00
Paulus Schoutsen 63a843c19c Fix test 2019-12-22 10:31:23 +01:00
Alexei Chetroi 8e3dfbd5c9
Refactor ZHA electrical measurement sensor. (#30130) 2019-12-21 17:15:50 -05:00
Alexei Chetroi fb3bb8220b
Implement ZHA entity classes registry (#30108)
* ZHA Entity registry.
Match a zha_device and channels to a ZHA entity.

* Refactor ZHA sensor to use registry.
* Remove sensor_types registry.
* Fix ZHA device tracker battery remaining.
* Remove should_poll/force_update attributes.
* Fix binary_sensor regression.
* isort.
* Pylint.
* Don't access protected members.
* Address comments and fix spelling.
* Make pylint happy again.
2019-12-21 16:26:58 -05:00
Jc2k b41480ae46 Add a config entry mechanism to rediscover a discovery that was ignored (#30099)
* Mechanism to rediscover a discovery that was ignored

* Add core config entry tests for new rediscover step

* Add tests for homekit_controller implementation of async_step_rediscover

* Rename rediscover to unignore

* Comment the new ignore/unignore mechanisms
2019-12-21 11:22:07 +01:00
ochlocracy 0faca57e8b Explicitly include Alexa interface for image_processing entities. (#30101) 2019-12-20 20:28:23 +01:00
Fazli Sapuan 92fd3e3ad5 Fix homekit handling of 0 light brightness and fan speed (#29962)
* Fix homekit handling of 0 light brightness and fan speed

* Update homekit tests for new initial brightness/speed value
2019-12-20 11:00:21 +01:00
Franck Nijhof eb0aed3653
Fix update port and api key on deconz discovery config entry u… (#30088)
* Fix update port and api key on discovery config entry update

* Remove coroutine from _update_entry
2019-12-20 10:29:18 +01:00
Ville Skyttä d236a19139
Include all SSDP data in discovery info (#28197)
* Include all SSDP data in discovery info

* Use UPnP device description as discovery info, inject some SSDP attrs

* Clean up attribute names

* Adapt existing SSDP flows to changed attribute names

* Prefix all SSDP UPnP attribute name constants with ATTR_UPNP, tweak a bit
2019-12-19 19:28:03 +02:00
ochlocracy 5baaa852dd Refactor Alexa capabilityResources object into class, Implement Alexa semantics object (#29917)
* Refactor capabilityResources object into class.
Implement semantics object to support open, close, raise, lower utterences.
Replace covers PercentageController with RangeController.
Add semantics for covers.
Remove PowerController for covers.
Add new display categories.
Add new items to Alexa Global Catalog.
Implement garage door voice PIN code support though Alexa app.
Fixed bug with getting property for ModeController.
Fixed bug were PercentageController AdjustPercentage would exceed 100.

* Comment fixes in Tests.

* Reorder imports.

* Added additional tests for more code coverage.

* Added and additional test for more code coverage.

* Explicitly return None for configuration() if not instance of AlexaCapabilityResource.
2019-12-19 12:44:17 +01:00
Jc2k c3144eddbb Set unique id on homekit_controller config entries (#30035)
* Set unique id on config entries

* Changes from review
2019-12-19 09:45:22 +01:00
Alexei Chetroi 41bef4b919 Add timer reload service. (#30015) 2019-12-18 21:15:11 +01:00
Paulus Schoutsen 9c7caaa142
Add option to ignore flows (#30008) 2019-12-18 07:41:01 +01:00
Robert Van Gorkom 78e831b08e Make tplink light more responsive (#28652)
* Making tplink light more responsive.

* Adding light platform tests.

* Addressing PR feedback.

* Mocking the module, not the api.

* Using sync method for background update.
2019-12-17 02:24:50 +01:00
Paulus Schoutsen 58b5833d64
Convert Hue to use unique ID (#30000)
* Convert Hue to use unique ID

* Fix normalization

* Store/restore unique ID

* Fix tests
2019-12-16 19:45:09 +01:00
Paulus Schoutsen d851cb6f9e
Add unique ID to config entries (#29806)
* Add unique ID to config entries

* Unload existing entries with same unique ID if flow with unique ID is
finished

* Remove unused exception

* Fix typing

* silence pylint

* Fix tests

* Add unique ID to Hue

* Address typing comment

* Tweaks to comments

* lint
2019-12-16 12:27:43 +01:00
Louis-Dominique Dubeau 33cbb398ad Don't use the locals parameter on exec. (#29979)
Using the locals parameter makes it so that the code of a Python script runs as
if it were in the body of a ``class``. One effect of this is that functions
defined as part of a script cannot call one another directly.

Fixes: #24704, #13653
2019-12-16 09:39:20 +01:00
Paulus Schoutsen 9e51a18845
Make hassfest import detection better (#29932)
* Make hassfest import detection better

* Fix tests
2019-12-16 08:22:20 +01:00
Kevin Eifinger fc01da8933 Migrate to api_key (#29966) 2019-12-16 08:20:41 +01:00
Joakim Plate 039cc98278 Support case of unknown/unavailable temperature/humidity (#29959)
* Support case of unknown/unavailable temperature/humidity

State is never None, just a string.

* Lint suggestion
2019-12-16 08:04:59 +01:00
Andrew Onyshchuk bfafa77016 Fix support for legacy Z-Wave thermostats (#29955)
This brings back support for Z-Wave thermostats
of SETPOINT_THERMOSTAT specific device class.
Such devices don't have COMMAND_CLASS_THERMOSTAT_MODE
and are now handled separately.
2019-12-15 20:02:18 -05:00
Ville Skyttä d6f317c0a9
Remove deprecated rflink configs (#29972)
They've been deprecated and automatically replaced since July 2017
already, fe6a4b8ae5
2019-12-15 22:57:23 +02:00
Chris Caron 09f3362cc6 isort fix on test_media_player (#29965) 2019-12-15 16:07:57 +01:00