Commit Graph

5382 Commits (dbd821a564fb3adb0e9e9720ba7e8716a3fc597e)

Author SHA1 Message Date
uvjustin 47801e7350
Abort forked-daapd zeroconf flow if version < 27 (#35709)
* Change MediaPlayerDevice to MediaPlayerEntity

* Abort zeroconf if mtd-version < 27.0
2020-05-17 09:23:44 -04:00
Xiaonan Shen 06d32baea4
Fix garmin_connect test (#35724) 2020-05-17 14:48:56 +02:00
J. Nick Koston 1297a09344
Avoid locking in the logging queue handler (#35700)
* Avoid locking in the logging queue handler

We do not need a lock here as the underlying queue is already
thread safe.

* Add coverage for logging handle
2020-05-17 14:39:27 +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
Steffen Zimmermann 51eebb3906
Add config option to set timeout for wiffi devices (#35694)
* add config option to set timeout for wiffi devices

Wiffi devices allow to configure the update period (=
full_loop_minutes). The integration shall respect the configured update
period and therefore need a configuration for the timeout, too.

* Move timeout from config flow to option flow

* add test for option flow
2020-05-17 10:31:28 +02:00
Carlos Giraldo d02bb70f0c
deCONZ - Add support for "Window covering controller" (#35294)
* Add support for "Window covering controller" 

Some window cover devices such as Sunricher SR-ZG9080A are identified in deconz as "Window covering controller".
We need to include this device type in const.py to be integrated as type "cover" in home-assistant.

* Added Window covering controller to deconz tests
2020-05-17 09:57:24 +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
gadgetmobile 6e0359efa6
Add Blebox air quality support (#35372)
* support BleBox air-quality

* fixed switch tests via cherry-pick from #35552

* fix test after cherry-picking

* fix flake8 issues
2020-05-16 10:51:37 -05:00
J. Nick Koston 73616520c0
Use built in queue log handlers to avoid formatting logs in the event loop (#35633)
* Use built in queue log handlers to avoid formatting logs in the event loop

Logging is now formatted and written in another thread to
ensure there is minimal impact on the event loop when
a log message is processed.

This change replaces the existing AsyncHandler log handler
as python 3.7+ now offers an off the shelf solution

* add a simple test

* s/async_migrate_log_handlers_to_queue/async_activate_log_queue_handler/g
2020-05-16 09:29:58 -05:00
Franck Nijhof d3ae8a938c
Fix handling of additional data in core config storage (#35660) 2020-05-16 13:31:15 +02:00
Chris Talkington aaf515ef67
Prevent discovery of IPP printers lacking identifier (#35630) 2020-05-16 10:48:36 +02:00
Robert Svensson 714047f789
Axis - Streamline setup and teardown of integration (#35675)
* Streamline setup and teardown of integration

* Dont remove integration twice
2020-05-15 23:56:09 +02:00
gadgetmobile 890013cecf
Add Blebox switch support (#35371)
* support BleBox switches

* fix tox py37 test failures

* refactor BleBox device class map
2020-05-15 16:48:17 -05:00
Quentame d8c7a10fd7
Bump python-synology to 0.8.1 (#35640)
* Bump python-synology to 0.8.1

* Fix tests
2020-05-14 22:20:53 -05:00
J. Nick Koston 047f3d6061
Fix CI failure on arcam tests (#35641) 2020-05-15 01:27:22 +02:00
Joakim Plate 5c0d237c2d
Add device triggers to support setting turn_on event (#35456)
* Add device triggers to support setting turn_on event

* Add turn on event

* Add unique_id based on config entry

* Adjust tests for addition of uuid

* Supported features are now always same

* Switch to player_setup fixture that actually start platform

* Update homeassistant/components/arcam_fmj/const.py

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-05-14 23:24:19 +02:00
Steven Looman d0d9b4df78
Properly handle incomplete upnp ssdp discovery (#35553) 2020-05-14 22:58:41 +02:00
Franck Nijhof 0be20ec6ab
Rename zwave_mqtt to ozw (#35631) 2020-05-14 22:56:04 +02:00
Alexei Chetroi 7e1c836acb
Don't remove deprecated ZHA config option yet (#35627) 2020-05-14 13:50:54 -04:00
uvjustin 9fd6db4b5f
Clean up forked_daapd volume saving/setting in async_play_media (#35584)
* Clean up volume saving/setting in async_play_media

* Set source to pipe when queued externally

* Add server version requirement to error string
2020-05-14 19:42:00 +02:00
Bram Kragten cb7b8d94c0
Add check for HTML in translations (#35615)
* Add check for HTML in translations

and remove existing html

* Add test
2020-05-14 19:33:14 +02:00
J. Nick Koston a42a654590
Fix reversed logic in zeroconf homekit pairing check (#35596)
* Fix reversed logic in zeroconf homekit pairing check

* s/server_info/service_info/
2020-05-14 18:58:40 +02:00
starkillerOG 256370afa8
Xiaomi Miio zeroconf discovery (#35352) 2020-05-14 15:59:40 +02:00
Robert Svensson e6c58c9795
Axis - Code improvements (#35592)
* Adapt library improvements
Clean up integration and tests and make them more like latest changes in UniFi integration

* Bump dependency to v26
2020-05-14 10:49:27 +02:00
Ville Skyttä e2b45915a6
Upgrade flake8 to 3.8.1, fix findings (#35578) 2020-05-13 17:14:30 -05: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
Xiaonan Shen ce99fa8c02
Add config flow to pi_hole integration (#35442)
* Add config flow to pi-hole

* Add config flow tests

* Change PlatformNotReady to ConfigEntryNotReady

* Improve config flow

* Add @shenxn as codeowner

* Use entity_id as unique id

* Remove .get with [] for required fields

* Remove unique id from config flow

* Replace some strings with references

* Fix api_key string

* Fix service api_key check

* Remove unused DuplicatedNameException
2020-05-13 09:25:06 -04:00
uvjustin c41fb2a21f
Add forked_daapd integration (#31953)
* New forked_daapd component

* Bunch of changes

Add config flow and zeroconf
Add zones on callback when added by server
Add password auth
Add async_play_media for TTS
Add media_image_url
Add support for pipe control/input from librespot-java
Improve update callbacks

* Refactor as per code review suggestions

Move config_flow connection testing to pypi library (v0.1.4)
Remove use of ForkedDaapdData class
Decouple Master and Zone data and functions
Add updater class to manage websocket and entity updates

* More changes as per code review

Avoid direct access to entities in tests
Bump pypi version
Mark entities unavailable when websocket disconnected
Move config tests to test_config_flow
Move full url creation from media_image_url to library
Move updater entity from master to hass.data
Remove default unmute volume option
Remove name from config_flow
Remove storage of entities in hass.data
Use async_write_ha_state
Use signal to trigger update_options
Use unittest.mock instead of asynctest.mock

* Yet more changes as per code review

Add more assertions in tests
Avoid patching asyncio
Make off state require player state stopped
Only send update to existing zones
Split up some tests
Use events instead of async_block_till_done
Use sets instead of lists where applicable
Wait for pause callback before continuing TTS

* Remove unnecessary use of Future()

* Add pipes and playlists as sources

* Add support for multiple servers

Change config options to add max_playlists+remove use_pipe_control
Create Machine ID in test_connection and also get from zeroconf
Modify hass.data storage
Update host for known configurations
Use Machine ID in unique_ids, entity names, config title, signals

* Use entry_id as basis for multiple entries

* Use f-strings and str.format, abort for same host

* Clean up check for same host
2020-05-13 09:13:41 -04:00
jjlawren c12f8bed43
Plex discovery on demand (#35303)
* Allow Plex discovery on demand

* Add new discovery source

* Add tests
2020-05-13 09:11:00 -04: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
Martin Hjelmare 2a120d9045
Patch aiohttp client session close (#34769)
* Patch aiohttp client session close

* Add test

* Restore close regardless of auto_cleanup

* Close session instead of detaching and do not restore

* Delint test

* Add frame helper

* Use frame helper

* Test warning log when closing session

* Clean up

* Correct docstring

* Do not change shutdown

* Fix tests
2020-05-13 09:58:33 +02:00
Robert Svensson 785b8d2bd1
UniFi - Sites don't declare role on UniFiOS 1.7.0 beta (#35555)
* New way to identify role, compatible with standalone controller or as part of unifios

* Remove error

* Bump dependency to v22

* Remove unused import
2020-05-13 00:37:16 +02:00
Franck Nijhof eddb5c6c3f
Add more system information from Supervisor (#35560) 2020-05-12 15:27:34 -07:00
Emily Mills 306f15723d
Add Zerproc integration (#35477) 2020-05-13 00:26:44 +02:00
Thomas Johanns 8f76f59b8b
Implement soundtouch select source (#31669) 2020-05-12 22:56:12 +02:00
On Freund 3fcd7866cc
Try to automatically detect zones on first run of Monoprice integration (#35127) 2020-05-12 22:30:59 +02:00
J. Nick Koston 16cc4aed06
Ensure homekit_controller recieves zeroconf c# updates (#35545)
* Ensure homekit_controller recieves zeroconf c# updates

If an integration has a homekit config flow step
homekit controller would not see updates for
devices that were paired with it and would not
rescan for changes.

* Only send updates to homekit controller if the device is paired

This avoids the device showing up a second time.

* remove debug

* fix refactor error
2020-05-12 14:59:29 -05:00
Marcel van der Veldt 1351ddd11e
Add binary sensor platform to zwave_mqtt (#35519)
* add binary sensor platform to zwave_mqtt

* add tests for binary_sensor

* fix tests

* device class is required value

* Update homeassistant/components/zwave_mqtt/binary_sensor.py

use colon as separator

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

* extend tests

* code optimize

* add test for enabling a legacy binary sensor

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-05-12 20:07:11 +02:00
Paulus Schoutsen 1f71bdedab
Add temperature device class to Darksky sensors (#35544) 2020-05-12 10:37:04 -07:00
gadgetmobile 53771bd576
support BleBox sensor (#35374) 2020-05-12 09:10:03 -05:00
MatsNl 4099815a08
Rewrite Atag (#35496)
* rewrite library

* Update strings.json

* fix updated with empty reply

* dont use entity_id

* atag_id

* use super init instead

* original ids to prevent breaking change
2020-05-12 11:47:33 +02:00
Xiaonan Shen 2748dcaaf1
Use common strings for songpal config flow (#35517) 2020-05-11 22:48:41 -05:00
Alexei Chetroi 2f73361381
Bump up ZHA dependecy (#35521)
* Bump up ZHA dependecy
* Fix tests.
2020-05-11 20:22:27 -04:00
J. Nick Koston 3315c4c6c3
Pre-filter zeroconf service browser updates (#35518)
Each ServerBrowser currently runs in its own thread which
processes every A or AAAA record update per instance.

As the list of zeroconf names we watch for grows, each additional
ServiceBrowser would process all the A and AAAA updates on the network.

To avoid overwhemling the system we pre-filter here and only process
DNSPointers for the configured record name (type)
2020-05-11 18:30:15 -05:00
Dan Jenkins dd22200a69
Compare uvc rtsp stream uri to host config (#31107) 2020-05-12 00:50:54 +02:00
J. Nick Koston 751529feca
Use system zeroconf singleton for homekit (#35502)
Zeroconf instances are expensive so we share a single instance
instead of running multiple.
2020-05-11 13:21:16 -05:00
Steven Looman 48899c7a1c
Move upnp update_interval options flow (#35474) 2020-05-11 20:03:12 +02:00
Fredrik Erlandsson 93f8d21bc0
Bump pydaikin to 2.0.1, catch HTTPForbidden exception (#35466) 2020-05-11 10:39:20 -07:00
J. Nick Koston 0a9b373edb
Show device details in homekit accessory service info (#35100)
* Show device info in homekit accessory service info

* fix conflict
2020-05-11 09:09:48 -05:00