Commit Graph

24075 Commits (a017c262349e0e34da7e302f223261ecb06bd06b)

Author SHA1 Message Date
Franck Nijhof a017c26234
Partially Revert "Deprecate hide_if_away from device_tracker (#30833) (#31348) 2020-01-31 08:27:16 -08:00
Johann Kellerman ab3157e661
Upgrade pysma, fix #27154 (#31346) 2020-01-31 08:25:54 -08:00
Raman Gupta a0067a298a
Remove Throttle on async_setup and bump pyvizio version (#31337) 2020-01-31 12:45:23 +01:00
Paulus Schoutsen 6a7bb7b149
Fix incorrect annotation async flock notify (#31342)
* Fix incorrect annotation async flock notify

* Update notify.py

* Update notify.py

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
2020-01-31 10:58:27 +01:00
Paulus Schoutsen d405069406
Guard for callbacks in service helper (#31339) 2020-01-31 09:32:43 +01:00
Martin b22dfa119b
Emulated Hue: changed fallback device-type to fix Alexa compatibility issues (#30013) (#31330)
* Emulated Hue: changed the reported fallback device-type to fix Alexa compatibility issues (#30013)

* Emulated Hue: updated tests (#30013)
2020-01-30 23:30:13 -08:00
Phil Bruckner 7e9507833b
Fix async bug in amcrest when registering services (#31334) 2020-01-30 23:28:53 -08:00
HomeAssistant Azure 74413e07d0 [ci skip] Translation update 2020-01-31 00:31:57 +00:00
Franck Nijhof 611127a6bc
Bump pytest to 5.3.5 (#31327) 2020-01-31 00:04:59 +01:00
Robert Svensson a8374cf423
UniFi - Try to discover local controller (#31326)
* Its working

* Use "unifi" as default host if a controller can be found

* Fix tests

* Make a fixture of patching the discovery function
2020-01-30 23:06:43 +01:00
Robert Svensson 56657fa859
Axis - config flow use new helper functions (#31286)
* Make use of new config flow helpers
Simplify Axis entry config to work with config flow helpers

* Keep old device data for rollback purposes
2020-01-30 22:20:30 +01:00
SukramJ cd1aa46404
Register on HA stop event to gracefully shutdown HomematicIP Cloud connections (#31289)
* Register on HA stop event to gracefully shutdown HomematicIP Cloud connections

* fixes after review

* Fix lint

* switch to unload_entry

* Save listener

* Switch back to hap.async_reset()
2020-01-30 22:14:43 +01:00
Raman Gupta 73ea34e417
Update media_player and add tests to qualify vizio integration for platinum quality score (#31187)
* add media player test and update media player logic to qualify vizio for platinum quality score

* add SCAN_INTERVAL and log message once when device goes from available to unavailable and vice versa

* move test constants into one file to avoid defining dupes in each test file

* move constant to shrink diff

* move pytest fixtures to conftest.py

* remove commented out code

* move unload test to test_init

* updates to tests and logging based on review

* bypass notification service

* add fixture so component setup makes it through config flow

* split failure tests into two

* fix setup and entity check for test_init and setup failures in test_media_player

* make domain references consistent across test files

* remove logging steps that were introduced to help debug

* move common patches out to new fixture and use config entry everywhere appropriate

* fix docstring

* add test for update options to increase code coverage

* add one more assert

* refactor test_media_player to move boiler plate logic out of each test into _test_init function

* final refactor of test_media_player to move repeat logic into separate function

* update docstrings

* refactor setup failure tests to move shared logic into private function

* fix last new functions code to use variable instead of static config variable

* remove trailing comma

* test that volume_step gets properly passed to Vizio volume function

* fix comment language

* assert with unittest.mock.call in _test_service and use config_entries.async_setup instead of config_entries.async_add

* replace config_entries.async_add with config_entries.async_setup everywhere

* simplify if statement for argument assertion

* fix logging based on style guide

* remove accidentally committed changes

* update scan interval to something more reasonable and add tests for availability changes

* change filter function to list comprehension, simplify log messages, remove default entity id from logs since it is user configurable, fix docstrings
2020-01-30 22:13:45 +01:00
endor 9ab6d08b97
Bump pytrafikverket to 0.1.6.1 (#30697)
* Bumped version for pytrafikverket

* Updated version for pytrafikverket

* Updated version for pytrafikverket
2020-01-30 21:46:20 +01:00
Rick 3718b25bd9
Add opening and closing states to MQTT covers (#31259)
* Added support for the opening and closing states to MQTT covers

* Processed PR feedback on MQTT cover changes

* Add missing MQTT abbreviation to fix failing tests

* Fixed typo in MQTT abbreviations

* Added mqtt set cover position optimistic test
2020-01-30 21:14:46 +01:00
Paulus Schoutsen d5486f883d
Fix wemo lights (#31323) 2020-01-30 11:40:16 -08:00
Paulus Schoutsen d6d3feb54e
Guard Z-Wave light HS conversion on None (#31320) 2020-01-30 11:13:54 -08:00
Rami Mosleh 9432054066
Rework Mikrotik device scanning following Unifi (#27484)
* rework device scanning, add tests

* update requirements and coverage

* fix description comments

* update tests, fix disabled entity updates

* rework device scanning, add tests

* update requirements and coverage

* fix description comments

* update tests, fix disabled entity updates

* update librouteros to 3.0.0

* fix sorting

* fix sorting 2

* revert to 2.3.0 as 3.0.0 requires code update

* fix requirements

* apply fixes

* fix tests

* update hub.py and fix tests

* fix test_hub_setup_failed

* rebased on dev and update librouteros to 3.0.0

* fixed test_config_flow

* fixed tests

* fix test_config_flow
2020-01-30 10:21:51 -08:00
Paulus Schoutsen 33361f8580
Fix HTTP config serialization (#31319) 2020-01-30 09:47:16 -08:00
Bram Kragten 0a1e397119
Updated frontend to 20200130.0 (#31318) 2020-01-30 09:30:59 -08:00
Paulus Schoutsen d24e397a80
Handle service calls that do not refer entity IDs (#31317) 2020-01-30 09:28:06 -08:00
Alexei Chetroi 24f4f53f16
ZHA dependencies bump (#31295)
* ZHA dependencies bump.

* Bump bellows-homeassistant.
2020-01-30 10:04:06 -05:00
Franck Nijhof 981d963554
Upgrade pre-commit to 2.0.1 (#31308) 2020-01-30 13:08:37 +01:00
Tom Harris 7ff30fe29d
Reorganize insteon code (#31183)
* Reorganize code

* Code review
2020-01-30 10:47:44 +01:00
Paulus Schoutsen ea666248ce
Add zones services.yaml (#31298) 2020-01-30 10:09:06 +01:00
Paulus Schoutsen cad451d2b7
Add zone to defaul config (#31303) 2020-01-30 10:06:17 +01:00
Paulus Schoutsen da14e2927f
Removes I/O from linky tests (#31299) 2020-01-29 21:59:24 -08:00
Alan Tse cf0e467150
Change scan_interval defaults for Tesla (#31194) 2020-01-29 20:15:47 -05:00
HomeAssistant Azure 8c178adf4f [ci skip] Translation update 2020-01-30 00:31:41 +00:00
Paulus Schoutsen c4a8af06e0 Merge remote-tracking branch 'origin/master' into dev 2020-01-29 16:29:36 -08:00
Paulus Schoutsen 01dad31adc
Fix service helper not handling sync methods (#31254)
* Fix service helper not handling sync methods

* Add legacy support for returning coroutine objects

* Fix tests

* Fix tests

* Convert demo cover to async
2020-01-29 16:27:25 -08:00
Robert Svensson 111fc1fa8e
Use all new helper functions (#31278) 2020-01-29 16:21:23 -08:00
Paulus Schoutsen 424e15c7a7
Find related items scripts/automations (#31293)
* Find related items scripts/automations

* Update manifest
2020-01-29 16:19:13 -08:00
Paulus Schoutsen 881437c085
Catch error when searching for scenes or automations (#31288) 2020-01-29 14:46:48 -08:00
Paulus Schoutsen e9e44dbd97
Fix callback and async (#31281)
* Fix callback and async

* Fix a return

* Fix test

* Fix mqtt tests

* Fix some more callbacks
2020-01-29 13:59:45 -08:00
ktnrg45 ee602e40a6
Add command 'ps_hold' to PS4 (#31283) 2020-01-29 22:57:40 +01:00
Bram Kragten 67b73bd74c
Updated frontend to 20200129.0 (#31279) 2020-01-29 21:40:41 +01:00
Jeff Irion 31dc2ad284
Allow filtering of sources for Android TV (#30994) 2020-01-29 14:13:09 -06:00
Phil Bruckner 61e41f0ddc
Add code owner for amcrest integration (#31276) 2020-01-29 11:50:18 -06:00
David F. Mulcahey f4a4c6bea5
ZHA group and device cleanup (#31260)
* add dispatching of groups to light
* added ha device registry device id
* added zha group object
* add group event listener
* add and remove group members
* get group by name
* api cleanup
* clean up get device info
* create and remove zigpy groups
* clean up create and remove group api
* use device id
* use device id
* cleanup
* update test
* update tests to allow group events to flow
2020-01-29 12:24:43 -05:00
Pascal Vizeli 6bbb713013
Fix tests for opnsense (#31277) 2020-01-29 18:18:24 +01:00
ochlocracy 83dff16e1e
Add support for rangeValueDeltaDefault in Alexa AdjustRangeValue directive (#31258)
* Update tests with rangeValue and rangeValueDelta to use int.

* Add support for rangeValueDeltaDefault for covers.

* Update tests for range changes.

* Test for AdjustRangeValue with rangeValueDeltaDefault True.

* Update tilt error.
2020-01-29 09:04:57 -08:00
ochlocracy 7116c7404a
Add PowerController to covers in Alexa (#31265)
* Add PowerController to covers.

* Comment Fix.

* Update test device_class.

* Update Comment.
2020-01-29 09:03:20 -08:00
Matthew Treinish 85dbf1ffad
Add OPNSense device tracker (#26834)
* Add OPNSense device_tracker

This commit adds a new component for using an OPNSense router as a
device tracker. It uses pyopnsense to query the api to look at the
arptable for a list of devices on the network.

* Run black formatting locally to appease azure

* Apply suggestions from code review

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

* Fix issues identified during code review

This commit updates several issues found in the module during code
review.

* Update homeassistant/components/opnsense/__init__.py

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

* Update CODEOWNERS for recent changes

* Fix lint

* Apply suggestions from code review

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* More fixes from review comments

This commit fixes several issues from review comments, including
abandoning all the use of async code. This also completely reworks the
tests to be a bit clearer.

* Revert tests to previous format

* Add device detection to opnsense device_tracker test

This commit adds actual device detection to the unit test for the setup
test. A fake api response is added to mocks for both api clients so that
they will register devices as expected and asserts are added for that.

The pyopnsense import is moved from the module level to be runtime in
the class. This was done because it was the only way to make the
MockDependency() call work as expected.

* Rerun black

* Fix lint

* Move import back to module level

* Return false on configuration errors in setup

This commit updates the connection logic to return false if we're unable
to connect to the configured OPNsense API endpoint for any reason.
Previously we would not catch if an endpoint was incorrectly configured
until we first tried to use it. In this case it would raise an unhandled
exception. To handle this more gracefully this adds an api call early in
the setup and catches any exception raised by that so we can return
False to indicate the setup failed.

* Update tests

* Add pyopnsense to test requirements

* Rerun gen_requirements script

* Fix failing isort lint job step

Since opening the PR originally yet another lint/style checker was added
which failed the PR in CI. This commit makes the adjustments to have
this pass the additional tool's checks.

* Fix comment

* Update manifest.json

Co-authored-by: Fabian Affolter <mail@fabian-affolter.ch>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
2020-01-29 16:20:43 +01:00
Jeff Irion 9312d06fe4
Catch 'ConnectionResetError' exceptions for Android TV integra… (#31274) 2020-01-29 15:18:57 +01:00
Quentame ec4ccb10ec
Bump iCloud to 0.9.2 + fix setup log (#31273)
- pyicloud to 0.9.2
- fix log `ERROR (MainThread) [homeassistant.config_entries] icloud.async_setup_entry did not return boolean`
2020-01-29 15:16:54 +01:00
tetienne fa15bead94
Remove useless assignment (#31272) 2020-01-29 14:08:53 +01:00
Alan Tse a1e1610a69
Add device_class to Tesla sensors (#31231) 2020-01-29 13:22:04 +01:00
Thibault Maekelbergh 64edf2fe33
Create truly live unique id (#31078)
* Create truly live unique id

* Do not generate unique id on basis of name

* Add the station to the default station live name
2020-01-29 12:12:40 +01:00
Rafał Słota 080827fb62
Fix light.turn_on for emulated_hue (#31195)
* Fix light.turn_on for emulated_hue

HarmonyHub sends `{'xy': [0, 0], 'on': True, 'bri': 0}` when turning on lights that do not support brightness control. Unfortunately current logic always uses  brightness value to control on/off state which makes no sense for lights that don't support brightness at all. This change fixes that behavior, making light without brightness control usable with HarmonyHub and probably some other remotes.

* Test 'no_brightness' lights
2020-01-29 12:11:22 +01:00