Commit Graph

5227 Commits (03676693ceed87582527a0c5bce1cb615779e30a)

Author SHA1 Message Date
Charles Garwood 8cf0a01149
Add refresh_node_info command to OZW websocket api (#38573)
* Add ozw refresh_node_info websocket api

* Remove extra unsubs definition

* Remove unused bits from refresh_node_info websocket

* Add tests

* Add unsubscribe test

* Wait for response in unsubscribe test
2020-08-12 15:49:40 -04:00
Raman Gupta fbf44b37a9
Simplify vizio unique ID check since only IP and device class are needed (#37692) 2020-08-12 16:50:36 +02:00
J. Nick Koston 444df4a7d2
Use the shared zeroconf instance when attempting to create another Zeroconf instance (#38744) 2020-08-12 16:08:33 +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
cgtobi f286992b10
Remove Netatmo HomeKit discovery method (#38770) 2020-08-12 08:41:11 +02:00
Franck Nijhof 5f95b5caaf
Fix lastest version in updater for Supervisor enabled installs (#38773)
* Fix lastest version in update for Supervisor enabled installs

* Fix updater tests
2020-08-12 08:00:38 +02: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
uvjustin 5355fcaba8
Add H.265 support to stream component (#38125)
* Add H.265 support to stream component

* Change find_box to generator

* Move fmp4 utilities to fmp4utils.py

* Add minimum segments and segment durations

* Remove MIN_SEGMENTS

* Fix when container_options is None

* Fix missing num_segments and update tests

* Remove unnecessary mock attribute

* Fix Segment construction in test_recorder_save

* fix recorder with lookback

Co-authored-by: Jason Hunter <hunterjm@gmail.com>
2020-08-11 17:12:41 -04:00
Franck Nijhof cc4ebc925c
Improve X-Forwarded-* request headers handling (#38696)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
2020-08-11 22:57:50 +02:00
Phil Bruckner 192fe58fc8
Time trigger can also accept an input_datetime Entity ID (#38698) 2020-08-11 15:16:28 -05:00
Ziv 6a8378bec0
Add Dynalite service to request the channel level (#38735)
* added service to request the channel level

* cleanup

* Update homeassistant/components/dynalite/__init__.py

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

* Update homeassistant/components/dynalite/__init__.py

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

* Update services.yaml

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-08-11 18:33:16 +02:00
David F. Mulcahey 6a24667944
Update Flo config flow and associated tests (#38722) 2020-08-11 14:13:40 +02:00
David F. Mulcahey 227d7c0a99
[RFC] Add Tag integration (#38727)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-08-11 11:08:47 +02:00
Diogo Gomes 39843319e2
Update IPMA weather component (#38697)
* long overdue mismatch

* missing updated tests
2020-08-10 21:55:44 -05:00
Vaclav 8555e17eb9
Add hourly forecast to met.no (#38700)
* Add hourly forecast

* fix tests to assert for 2 entities created

* fix test to assert for 4 calls

* correct test tracking home number of calls

* fox tests

* fix test

* Apply suggestions from code review

* black

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-08-10 20:22:39 -05:00
David F. Mulcahey 844b3f8d23
Make default duration 1/10th of a second for ZHA light calls (#38739)
* default duration to 1/10th of a second
* update test
2020-08-10 17:40:07 -04:00
Paulus Schoutsen 52729e9dc8
Add scan_tag webhook to mobile app (#38721) 2020-08-10 17:54:46 +02:00
Franck Nijhof 3d0ea42ac0
Add current device class to WLED current sensor (#38687) 2020-08-10 17:50:03 +02:00
Ziv ff539f3f05
Add Dynalite current preset service (#38689)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-08-10 16:30:59 +02:00
Jc2k f82f815304
Add water level sensors provided by UK Environment Agency (#31954) 2020-08-10 15:51:04 +02:00
David F. Mulcahey f1fd8aa51f
Add support for Flo by Moen water shutoff devices (#38171) 2020-08-10 14:19:38 +02:00
bsmappee 07de9deab6
Implement local discovery of Smappee legacy devices (#37812)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-08-10 13:34:18 +02:00
J. Nick Koston 9bb7b3b125
Fix homekit_controller pairing retry when the first attempt is busy (#38605)
* Fix homekit_controller pairing retry

If the device was busy on the first pairing attempt, it
was not possible to retry.

* always restart pairing on recoverable execptions

* move code

* malformed pin is safe to restart

* make busy_error an abort

* switch max retries, simplify tests

* try pairing later

* try pairing later

* merge

* s/tlv_error/protocol_error/g

* Adjust wording
2020-08-09 22:17:13 -05:00
David F. Mulcahey 4e56339ba1
add event and device action for when devices drop (#38701) 2020-08-09 20:37:07 -04:00
Vaclav b258e757c2
Add DataUpdateCoordinator to met integration (#38405)
* Add DataUpdateCoordinator to met integration

* isort

* redundant fetch_data

* Update homeassistant/components/met/weather.py

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

* Update homeassistant/components/met/weather.py

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

* Update homeassistant/components/met/__init__.py

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

* Update homeassistant/components/met/__init__.py

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

* Update homeassistant/components/met/__init__.py

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

* Update homeassistant/components/met/__init__.py

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

* Update homeassistant/components/met/weather.py

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

* Update homeassistant/components/met/__init__.py

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

* Update homeassistant/components/met/__init__.py

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

* Update homeassistant/components/met/__init__.py

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

* Update homeassistant/components/met/__init__.py

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

* Update homeassistant/components/met/__init__.py

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

* Update homeassistant/components/met/weather.py

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

* Update homeassistant/components/met/weather.py

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

* fix black, isort, flake8, hassfest, mypy

* remove unused async_setup method

* replace fetch_data by coordinator request_refresh

* remove redundant  async_update

* track_home

* Apply suggestions from code review

* Apply suggestions from code review

* Update homeassistant/components/met/__init__.py

* Apply suggestions from code review

* Update homeassistant/components/met/__init__.py

* Apply suggestions from code review

* Update homeassistant/components/met/__init__.py

* Apply suggestions from code review

* Update test_config_flow.py

* Apply suggestions from code review

* Apply suggestions from code review

* Update __init__.py

* Create test_init.py

* Update homeassistant/components/met/__init__.py

* Update __init__.py

* Update __init__.py

* Update homeassistant/components/met/__init__.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-08-09 13:18:02 -05:00
Marcio Granzotto Rodrigues 761067559d
Add Nightscout integration (#38615)
* Implement NightScout sensor integration

* Add tests for NightScout integration

* Fix Nightscout captalization

* Change quality scale for Nightscout

* Trigger actions

* Add missing tests

* Fix stale comments

* Fix Nightscout manufacturer

* Add entry type service

* Change host to URL on nightscout config flow

* Add ConfigEntryNotReady exception to nighscout init

* Remote platform_schema from nightscout sensor

* Update homeassistant/components/nightscout/config_flow.py

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

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-08-09 13:15:56 -05:00
On Freund 96d48c309f
Make CoolMasterNet integration async (#38643)
* make CoolMasteNet integration async

* Apply suggestions from code review

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

* Minor post-review tweaks

* Apply suggestions from code review

* Update homeassistant/components/coolmaster/__init__.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-08-09 13:08:07 -05:00
Chris 597d1e2799
Add missing Short type to set_config_param (#38618)
* Add missing Short type to set_config_param

* Forgot to fix the for loop

* Remove leftover return

* Guard the for loop

* Changed from if to else

* Fixed list iteration for validating input

* Adjusted per linter
2020-08-09 19:05:26 +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
Franck Nijhof 20710d8605
Add current request context to get_url helper (#38602) 2020-08-09 14:07:31 +02:00
Justin Paupore 53b729a0d1
Support muting and relative-volume media_players in Google Assistant (#38651)
Support the action.devices.commands.mute intent to mute and unmute
media_players that declare support for mute/unmute.

For media players with support for volume up/down, but no support for
setting the volume to a specific number, allow use of the
action.devices.commands.relativeMute intent to control volume up/down.
This will improve support for IR blasters and other open-loop
media_player integrations.
2020-08-09 14:03:53 +02:00
Thomas Hollstegge 5de21375c0
Make sure groups are initialized before template sensors (#37766)
* Make sure groups are initialized before template sensors

This way users may use the `expand` function in templates to expand
groups and have HA listen for changes to group members.

Fixes #35872

* Patch async_setup_platform instead of async_setup

* Cleanup

* Use an event to avoid sleep

* Update tests/components/template/test_sensor.py

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

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-08-08 21:34:14 -05:00
Matthew Garrett 34e2a1825b
Add support for exposing light effects via Google Assistant (#38575)
* Don't set SUPPORT_EFFECT on DemoLight if there are no effects

This requires an update to the group test - previously the other lights
instantiated by the DemoLight component had nothing in ATTR_EFFECT_LIST, but
still had SUPPORT_EFFECT set. This appears to have resulted in the light
group test code setting an effect on the group and expecting it to apply to
all lights, but given that two of the bulbs didn't actually support any
effects (due to the empty ATTR_EFFECT_LIST) this seems like a broken
assumption and updating the test to verify only the bulb that supports
effects has had one applied seems reasonable.

* Add support for exposing light effects via Google Assistant

The LightEffects trait only supports a fixed (and small) list of lighting
effects, but we can expose them via the Modes trait - this requires saying
"Set (foo) effect to (bar)" which is a little clumsy, but at least makes it
possible.
2020-08-08 14:28:04 -07:00
fabiocastagnino 02d572aae5
Add device classes for electrical measurement (#36800)
* added device classes for electrical measurement

(cherry picked from commit 2409fe19ed43bef568a0cca826652867d3a2d71a)

* upadte power factor unit (%)

* update power factor unit (%)
2020-08-08 21:04:18 +02:00
J. Nick Koston 74c23c3e96
Add support for reload_on_update to _abort_if_unique_id_configured (#38638)
* Add support for reload_on_update to _abort_if_unique_id_configured

async_update_entry now avoids firing update listeners and writing
the storage if there are no actual changes.

* Actually add the tests

* collapse branch

* Update homeassistant/config_entries.py

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

* handle entries that lack the ability to reload

* reduce

* adjust konnected tests

* update axis tests

* fix blocking

* more mocking

* config flow tests outside of test_config_flow

* reduce

* volumio

* Update homeassistant/config_entries.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* set reload_on_update=False for integrations that implement self._abort_if_unique_id_configured(updates= and a reload listen

* get rid of copy

* revert test change

Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-08-08 13:23:56 -05:00
Bas Nijholt 0427d87ba4
Bump codespell from v1.16.0 to v1.17.1 and fix new spelling errors (#38663) 2020-08-08 14:41:02 +02:00
Raman Gupta 0d5e279509
Standardize Vizio update service schema (#38636)
* update voluptuous schema to match standards and to handle data transformations

* improve test
2020-08-07 21:29:54 -05:00
Eugene Prystupa 50cd6be18d
Raise error when unsupported (old) Bond firmware is detected (#38650) 2020-08-07 21:22:13 -05:00
Aaron Bach 4cceb4ad0a
Bump regenmaschine to 2.1.0 (#38649) 2020-08-07 18:01:55 -06:00
Paulus Schoutsen 881b6a831d
Handle unavailable input_select in Google Assistant (#38611) 2020-08-07 08:17:00 +02:00
Raman Gupta 297dd9bbc2
Add vizio service to update a device setting (#36739)
* track all settings and add service to update a setting

* sort setting types

* reduce frequency of updates due to the increase in API calls per update

* change dict call to a get in case audio settings aren't available

unlikely to occur but less error prone

* Update if statement to be more consistent

* revert changes to track all settings and store in state machine

* revert one more change

* force setting_type and setting_name to lowercase to make it easier to understand how to make service call

* make service calls even simpler by attempting to transform certain parameters as much as possible
2020-08-06 22:43:03 -04:00
Austin Drummond 937d993a67
Expose video doorbell button state to HomeKit (#38617) 2020-08-06 17:47:39 -05:00
Ziv ae40f87a5c
Add events to Dynalite platform (#38583)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-08-06 20:40:54 +02:00
Kendell R 0cdd47b014
Change http to auto for cast media image url (#38242)
* Change http to auto

* Update media_player.py

* Update test_media_player.py

* Update test_media_player.py

* Update test_media_player.py

* Update test_media_player.py

* Update test_media_player.py

* Update test_media_player.py

* Update test_media_player.py

* Update test_media_player.py

* Update test_media_player.py

* Format
2020-08-06 17:21:45 +02:00
Joakim Plate 39e6bca682
Support Next/Previous for InputSelector (#38378)
* Support Next/Previous for InputSelector

* Update homeassistant/components/google_assistant/trait.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Adjust to match new version of _next_selected

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-08-06 15:58:26 +02:00
starkillerOG aaad986002
Improve Xioami Aqara zeroconf discovery handling (#37469)
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-08-06 12:54:18 +02:00
Quentame 21f4d694bb
Remove Linky integration (#38565) 2020-08-06 11:18:05 +02:00
Erik Montnemery 4ed1f8023b
Suppress MQTT discovery updates without changes (#38568) 2020-08-06 10:43:47 +02:00
Bram Kragten d66ddeb69e
Allow to set default dark theme and persist frontend default themes (#38548)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-08-05 17:42:23 +02:00
J. Nick Koston d0d0403664
Add zeroconf/homekit/ssdp discovery support for custom components (#38466)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-08-05 15:50:56 +02:00