Commit Graph

5030 Commits (a4c9446b8d75d1b36b1ca97c9f62e005a091ca45)

Author SHA1 Message Date
On Freund a4c9446b8d
Fix Monoprice robustness (#33869)
* Silently handle update failures

* Limite parallel updates

* Remove return values

* Remove trailing return

* Add test for empty update
2020-04-09 17:04:12 +02:00
Quentame 45b28b8b00
Add local_ip unique_id & icon and single_instance_allowed (#33483)
* Add config flow + sensor unique_id & icon to local_ip

* single_instance_allowed

* Fix test

* Martin's review

* Name deprecated
2020-04-09 16:06:01 +02:00
Erik Montnemery 3845539577
Lookup manufacturer name for casts (#33845)
* Lookup manufacturer name, remove use of get_multizone_status

* Bump pychromecast

* Bump pychromecast

* Fix test
2020-04-09 10:58:19 +02:00
Raman Gupta b46eee04e4
Fix vizio bug that occurs when CONF_APPS isn't in config entry… (#33857)
* fix bug when search for string in dict fails when dict is null

* another bug fix that I only noticed because of this other bug

* add test to cover failure scenario

* update docstring

* add additional assertions to cover failure scenario that's being fixed
2020-04-08 20:44:33 -07:00
J. Nick Koston ff936302d7
Fix Doorbird yaml import aborted if discovery finds it first (#33843) 2020-04-08 18:29:46 -07:00
J. Nick Koston 8be7cb4539
Update nut to use DataUpdateCoordinator (#33831)
* Convert nut to use DataUpdateCoordinator

* Adjust per review

* ups_list is a dict with {id: name, ...}
2020-04-08 18:26:10 -07:00
Paulus Schoutsen bdb998bdb3
Fix last flaky TTS test (#33849) 2020-04-08 19:18:09 -05:00
springstan 9a40d5b7ed
Use HTTP_NOT_FOUND constant (#33835) 2020-04-09 00:57:47 +02:00
J. Nick Koston ac9429988b
Add a config flow for flume (#33419)
* Add a config flow for flume

* Sensors no longer block Home Assistant startup
since the flume api can take > 60s to respond on
the first poll

* Update to 0.4.0 to resolve the blocking startup issue

* Missed conversion to FlumeAuth

* FlumeAuth can do i/o if the token is expired, wrap it

* workaround async_add_entities updating disabled entities

* Fix conflict
2020-04-08 16:29:59 -05:00
springstan fb8f8133a0
Use HTTP_INTERNAL_SERVER_ERROR constant (#33832) 2020-04-08 23:20:03 +02:00
Robert Svensson 15ab63a4c2
UniFi: Add UDM/P (UniFi OS) support (#33766)
* Fix get_controller and all tests:wq

* Bump dependency to v16
2020-04-08 23:19:39 +02:00
J. Nick Koston 7dd42bc32d
Separate august keypads into their own device (#33665)
The keypad has its own unique id so its better
represented as its own device.  This fixes
showing the keypad battery state for the lock
in the UI.
2020-04-08 12:57:27 -07:00
Paulus Schoutsen df744c5944
Speed up TP-Link lights (#33606)
* Speed up TP-Link lights

* Color temp kan be None

* hs as int, force color temp=0

* Fix color temp?

* Additional tplink cleanups to reduce api calls

* Update test to return state, remove Throttle

* Fix state restore on off/on

* Fix lights without hue/sat

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-04-08 14:36:45 -05:00
Robert Van Gorkom ea709d0630
Remove withings sleep state (#33817) 2020-04-08 11:57:42 -07:00
J. Nick Koston cec3b57390
Fix thermostats that do not support off under homekit (#33809)
TargetHeatingCoolingState: value=0 is an invalid value.
would be raised when a thermostat did not support
off.
2020-04-08 11:56:11 -07:00
Martin Hjelmare c3decc6531
Do not ban supervisor ip if set (#33781)
* Use asynctest patch instead of mock_coro

* Add test for supervisor ip ban

* Do not ban supervisor ip if set

* Extract supervisor ip helper

* Check supervisor ip before banning

* Remove added blank line

* Clean up get supervisor ip

Co-Authored-By: Pascal Vizeli <pvizeli@syshack.ch>

Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
2020-04-08 10:31:44 -07:00
J. Nick Koston 7383e81609
Convert nut to a multi step config flow (#33803)
* Convert nut to a multi step config flow

* Users can now choose the ups they want in
step 2 (or skipped if only one)

* Users can now select the resources they want
to monitor based on what is actually available
on the device

* CONF_NAME has been removed as we now get the
name from NUT

* Device classes have been added which allows
the battery charge state to be seen in the
devices UI

* Remove update_interval as its for a followup PR

* explict

* reduce

* fix bug, add tests for options flow

* Test for dupe import

* Test for dupe import

* Call step directly

* Update homeassistant/components/nut/config_flow.py

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-04-08 11:45:45 -05:00
MatthewFlamm a3e84791c6
Convert nws integration to component configuration (#31398)
* convert nws to component configuration

* add more debug logging

* remove assumed state

* move initialization of data into init

* refactor update logic

* use forecast success for checking available entities

* Split unique_id into more usable pieces.

use a base_unique_id for each entry.  Add domain for signaling to entities.  Each entity in each platform can use base_unique_id to form individual unique_id's.

* Revert "move initialization of data into init"

This reverts commit 09eb0220469285b10f0500f5f6def67415931a81.

* add silver quality scale to manifest

* unsubscribe listener in will_remove_from_hass

* initialize _unsub_listener in __init__

* use async_on_remove

* remove scan interval from configuration

* Use better name

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

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-04-08 10:22:25 -05:00
Paulus Schoutsen ba8ae17487
Fix hue ct (#33791) 2020-04-08 11:31:41 +02:00
springstan eae21be5b9
Improve string formatting v6 (#33698) 2020-04-07 23:14:28 +02:00
springstan 46bbe816f6
Remove None from dict.get(key, None) (#33794) 2020-04-07 21:06:05 +02:00
Chris Talkington d54ee77375
Update directv remote platform tests service calls (#33793)
* Update test_remote.py

* Update test_remote.py
2020-04-07 11:57:51 -07:00
J. Nick Koston 078ce6766e
Add discovery support to synology_dsm (#33729)
* Add discovery support to synology_dsm

* Remove debug

* black

* Fix mocks

* Merge strings

* Move placeholders

* add missing placeholders

* reorder

* use constants in test

* Remove CONF_NAME (only displayed in discovery now)

* test reduction

* Shorten long name

* Use name for name but NOT for unique_id, remove CONF_NAME from yaml config

* Use Synology for the name for now, hopefully we can use the hostname later

* lint

* Remove name from strings

* remove =None

* show login errors at username field

* Update tests/components/synology_dsm/test_config_flow.py

Co-Authored-By: Quentame <polletquentin74@me.com>

* Update tests/components/synology_dsm/test_config_flow.py

Co-Authored-By: Quentame <polletquentin74@me.com>

* Update homeassistant/components/synology_dsm/const.py

Co-authored-by: Quentame <polletquentin74@me.com>
2020-04-07 10:22:35 -07:00
Paulus Schoutsen 8fb89854d3
Fix flaky TP-Link test (#33790) 2020-04-07 10:13:55 -07:00
Erik Montnemery ddef681dd2
Improve MQTT debug info for subscriptions with wildcard (#33752) 2020-04-07 09:38:22 -07:00
Ziv 3697ea7b27
Remove uncaught exceptions from rflink (#33709)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-04-07 09:37:54 -07:00
Franck Nijhof bb8bbc9c54
Collection of tests improvements (#33778) 2020-04-07 09:36:35 -07:00
Ziv bee742994e
Fix uncaught exceptions for discovery, unify_direct, spotify,… (#33735)
* used coroutinemock to avoid exception

* added spec to mock to remove exception

* added the current_user return value so it doesnt throw exception

* fix the mocks so properties do not need .return_value

* fixed missing mock values that were causing exceptions

* moved patch to asynctest so no need to define m_init

* fixed black error
2020-04-07 09:34:13 -07:00
Franck Nijhof 60bc517d01
Collection of core tests improvements (#33757)
* Collection of core tests improvements

* Added some more

* Fix aiohttp client response release
2020-04-07 09:33:23 -07:00
Chris Talkington 1f7803c541
Catch IPPParseError during config flow (#33769)
* Update config_flow.py

* Update strings.json

* Update config_flow.py

* squash.
2020-04-07 09:32:43 -07:00
jan iversen b3286a4a01
Fix Modbus review comments (#33755)
* update common test for modbus integration

* remove log messages from modbus setup function.

* Make global method local

* Change parameter name to snake_case
2020-04-07 16:56:48 +02:00
Martin Hjelmare cb98d62968
Patch gdacs entry setup in config flow tests (#33776) 2020-04-07 12:36:40 +02:00
Paulus Schoutsen cc1564da4a
TTS: Wait till files are created in tests (#33760) 2020-04-06 15:11:46 -07:00
Erik Montnemery f3b6575272
Fix MQTT debug info for subscriptions with wildcard. (#33744) 2020-04-06 10:25:09 -07:00
Franck Nijhof 476072927a
Collection of random test improvements (#33742) 2020-04-06 10:09:44 -07:00
Ziv cedf7e3945
Fix unhandled exceptions for config, default_config, harmony (#33731)
* replaced MagicMock with CoroutineMock to avoid exception

* added conversion to str so mock returns unique-id that doesn't throw json exception

* added non-empty config since hass throws exception when config is empty
2020-04-06 13:36:49 +02:00
Franck Nijhof 98a2efcbab
Collection of random (mainly) test improvements (#33733) 2020-04-06 12:51:48 +02:00
Jevgeni Kiski a1aebe904e
Add MQTT Alarm Control Panel custom bypass state (#32541)
* MQTT Alarm Control Panel to have all available states

* MQTT Alarm Control Panel to have all available states

* test_arm_custom_bypass_* tests added

* MQTT payload_arm_custom_bypass abbreviation
2020-04-06 11:45:37 +02:00
Ziv ffa111deb9
Fix exceptions in tests for samsung_tv (#33732) 2020-04-06 11:21:52 +02:00
J. Nick Koston e4ee4cf302
Remove legacy async_add_job from homekit tests (#33727)
* Remove legacy async_add_job from homekit tests

* Empty commit to rerun CI
2020-04-05 21:33:36 -05:00
jan iversen 738ef38ddc
Modbus: isolate common test functions (#33447)
Since all entity test functions are going to use
the modbus class, isolate the common parts in
conftest.py, and thereby make it simpler to write
additional test cases.

cleaned up test_modbus_sensor.py while splitting the code.
2020-04-05 19:09:20 -04:00
Quentame d99e228983
Add config flow to Synology DSM (#32704)
* Add config flow to Synology DSM

* Use proper sensor unique ID from flow + sensor name

* Add description to api_version

* Add authentication flow check

* Add device_info

* Add test_login_failed test

* Bump python-synology to 0.5.0

* 0.5.0 test updates

* Use NAS S/N as config_flow unique_id

* Add missed conf disks + volumes

* Review: async_unload the async_track_time_interval

* Fix NoneType for disks or volumes

* Keep all disks and volumes forever

* Update homeassistant/components/synology_dsm/.translations/en.json

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

* Update homeassistant/components/synology_dsm/strings.json

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

* Fix "Keep all disks and volumes forever" for empty import

* Fix prettier

* Remove useless LOGGER in config flow

* Fix Synology DSM tests doing I/O

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-04-05 17:50:52 -05:00
springstan 67c3a4c970
Improve string formatting v7 (#33705) 2020-04-05 17:34:24 -05:00
J. Nick Koston d28b477f9a
Fix nuheat response error checking (#33712)
This integration was checking request instead
of response for the error code.
2020-04-05 15:23:20 -07:00
Quentame a16e742107
Fix iCloud tests doing I/O (#33721) 2020-04-05 15:21:22 -07:00
Ziv 5711c0882f
Fix exception in zwave test (#33711)
would be better to not have it in there but mock has all attributes
2020-04-05 15:17:24 -07:00
Ziv 18e4493ca3
Ignore tplink tests exceptions (#33710) 2020-04-05 15:16:16 -07:00
J. Nick Koston 171c1b20f7
Remap homekit auto to home assistant heat_cool (#33701)
Home Assistant auto mode is described as
"The device is set to a schedule, learned behavior, AI."

HomeKit Accessory Protocol expects "heating or cooling to maintain
temperature within the heating and cooling threshold of the
target temperature"

Since HomeKit is expecting to set temperatures in this mode,
mapping homekit state 3 ("Auto") to Home Assistant HVAC_MODE_HEAT_COOL
is more inline with how Home Assistant defines HVAC_MODE_HEAT_COOL
as "The device supports heating/cooling to a range"
2020-04-05 15:54:57 -05:00
Franck Nijhof d33cf28936
Add check executables have shebangs (in pre-commit and CI) (#33703)
* Add check executables have shebangs (in pre-commit and CI)

* Fix file permissions

* Adjust Azure Pipelines
2020-04-05 18:45:43 +02:00
Malachi Soord 3f0936f068
Prevent last.fm errors with None (#33446) 2020-04-05 18:03:13 +02:00