Commit Graph

5758 Commits (4d997180e608d30a246f1c52bfcdc60a5863f0b9)

Author SHA1 Message Date
Franck Nijhof f83f3c927a
Fix local media browser source conflicting with local www folder (#40151) 2020-09-16 21:38:40 +02:00
J. Nick Koston 5ea04d64f6
Prompt to reauth when the august password is changed or token expires (#40103)
* Prompt to reauth when the august password is changed or token expires

* augment missing config flow coverage

* augment test coverage

* Adjust test

* Update homeassistant/components/august/__init__.py

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

* block until patch complete

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-09-16 17:35:01 +02:00
Niccolo Zapponi 2b7e735e3d
Remove unsupported states from security systems in HomeKit (#40060) 2020-09-16 10:00:32 -05:00
Paulus Schoutsen d25192d8c5
Fix scene validator (#40140) 2020-09-16 16:26:34 +02:00
Franck Nijhof ff0562ad1e
Add media dirs core configuration (#40071)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-09-16 15:28:25 +02:00
AJ Schmidt 66bb6a6ffa
AlarmDecoder config flow fixes (#40037) 2020-09-16 00:11:29 +02:00
springstan 000d2047fb
Add and use currency constants (#40113) 2020-09-15 15:01:01 -06:00
Martin Hjelmare a71a4d642b
Clean dyson climate tests (#40110)
* Move setup without devices

* Remove not needed tests

* Move set temp test

* Move set temp cool mode test

* Run black

* Move test target temperature

* Move test current temperature

* Move test current humidity

* Move test hvac mode

* Move test hvac modes

* Move test fan modes

* Move test service fan modes

* Move test fan state

* Move test supported features

* Move test idle state

* Move test humidity invalid state

* Move test humidity without state

* Move test device cool

* Rename test

* Move test set mode service

* Clean imports

* Clean strings

* Only load climate platform for climate tests
2020-09-15 22:38:45 +02:00
cgtobi f651b1f54b
Extract Netatmo test data (#40094) 2020-09-15 21:49:08 +02:00
Dan Klaffenbach 74cef6966d
Expose angle and xy attributes in deCONZ event if present (#39822)
These attribute are used by the color wheel on the Müller Licht tint
remote control.
2020-09-15 21:13:17 +02:00
Hareesh M U c8d5500441
Add bimonthly period feature for utility_meter component (#39931) 2020-09-15 17:52:19 +02:00
Martin Hjelmare 487b56ab69
Fix hvv_departures config flow patches (#40095) 2020-09-15 12:37:31 +02:00
Franck Nijhof 5d0fa1417e
Upgrade pytest to 6.0.2 (#39959)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-09-15 10:09:56 +02:00
J. Nick Koston 2ea604cc2a
Convert color temperature to hue and saturation for HomeKit (#40089)
The HomeKit spec does not permit the color temp characteristic
being exposed when color (hue, sat) is present.  Since
Home Assistant will still send color temp values, we need to
convert them to hue, sat values for HomeKit
2020-09-15 09:27:30 +02:00
J. Nick Koston 8d687c951a
Update gogogate2-api to 2.0.2 (#40010)
* Update gogogate2-api to 2.0.2

Resolves a timeout issue: https://github.com/vangorra/python_gogogate2_api/pull/11

* mock voltage
2020-09-15 08:48:30 +02:00
r4nd0mbr1ck 11319ac479
Speedtestdotnet - use server name to generate server list (#39775) 2020-09-14 22:50:44 -07:00
Robert Van Gorkom 903afb62d0
Add support for multiple vera controller hubs (#33613) 2020-09-14 22:06:52 -05:00
cgtobi cb0452d80e
Fix netatmo media browser of outdoor events (#40079)
* Fix outdoor events

* Fix test data

* Increase coverage
2020-09-15 00:32:20 +02:00
J. Nick Koston 15281f468e
Extract the icon and state for logbook state changed events (#40039) 2020-09-14 09:35:19 -05:00
Paulus Schoutsen 3ba18550cd
Fix tag last scanned serialization (#40067) 2020-09-14 15:40:32 +02:00
Xiaonan Shen d26160c755
Add rpi_power integration (#35527)
Co-authored-by: Toast <swetoast@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-09-14 12:53:01 +02:00
rajlaud 6e6d6c65ef
Improve reproduce_state for media players (#38266) 2020-09-14 11:48:16 +02:00
Ville Skyttä eb0af3752c
Add more SSDP discovery data and constants (#39984) 2020-09-14 09:18:09 +02:00
J. Nick Koston 2e1dbe51a4
Make system_log test reliable (#40049) 2020-09-14 08:48:59 +02:00
Ville Skyttä ad1a71ebc3
Don't try to create /test dir in camera tests (#39914)
ERROR:homeassistant.components.camera:
Can't write image to file: [Errno 13] Permission denied: '/test'
2020-09-14 08:40:59 +02:00
Ville Skyttä aad6a24f28
Fix vizio async mock fixtures on Python 3.8.0 and .1 (#39926) 2020-09-14 08:35:30 +02:00
J. Nick Koston 2ff3c74fab
Fix intermittently failing dyson test (#40051) 2020-09-13 21:37:52 -05:00
Chris Talkington 056e712667
Add device class to canary sensors (#40050)
* add device class to canary sensors

* Update test_sensor.py

* Update sensor.py

* Update sensor.py
2020-09-13 21:29:59 -05:00
Chris Talkington 9511103e26
Add unique_id to canary alarm_control_panel (#40041)
* add unique_id to canary alarm_control_panel

* Update test_alarm_control_panel.py

* Update alarm_control_panel.py

* Apply suggestions from code review

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

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-09-13 18:52:40 -05:00
J. Nick Koston 7b016063ca
Refactor zeroconf setup to be async (#39955)
* Refactor zeroconf setup to be async

Most of the setup was calling back to async because
we were setting up listeners.  Since we only need
to jump into the executor to create the zeroconf
instance, its much faster to setup in async.

In testing this cut the setup time in half
or better.

* partial revert to after_deps
2020-09-13 18:06:19 -05:00
Chris Talkington 00acb180d6
Add canary alarm_control_panel tests (#40029)
* add canary alarm_control_panel tests

* Update .coveragerc

* Create test_alarm_control_panel.py

* Update __init__.py

* Update __init__.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update __init__.py

* Update __init__.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py
2020-09-13 16:36:26 -05:00
J. Nick Koston 46f9c0fb8a
Update phrasing and pin validation for homekit_controller (#40006) 2020-09-13 15:26:04 -05:00
AJ Schmidt c32f698671
Add Config Flow to AlarmDecoder (#37998) 2020-09-13 12:29:25 -05:00
Chris Talkington 17efa1bda5
Improve canary tests (#39956) 2020-09-13 11:32:41 -05:00
Robert Svensson ceeea52915
Improve handling of mireds being far out of spec (#40018) 2020-09-13 16:31:39 +02:00
J. Nick Koston 84578f515d
Suppress homekit bridge discovery by homekit controller (#39990) 2020-09-13 09:12:10 -05:00
Bouwe Westerdijk eac9c3c4f2
Ensure Plugwise unique_id is correctly set (#40014)
* Ensure unique_id is correctly set

* Removed unnec. line

Co-authored-by: Tom Scholten <git@scholten.nu>
2020-09-13 11:02:49 +02:00
Quentame bab4ad4f17
Add timeout config option to Synology DSM (#40000) 2020-09-12 20:36:39 -05:00
J. Nick Koston aaa8083d49
Change template loop detection strategy to allow self-referencing updates when there are multiple templates (#39943) 2020-09-12 14:20:21 +02:00
Felipe Martins Diel a6d3ee90f0
Improve tests for Broadlink config flow (#39894) 2020-09-11 20:00:28 -05:00
Felipe Martins Diel 9f08955fef
Improve tests for Broadlink devices (#39898) 2020-09-11 19:57:07 -05:00
Jc2k 988a467afd
Device automation triggers for stateless HomeKit accessories (#39090)
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-09-11 13:34:07 -05:00
J. Nick Koston 741487a1fc
Return the listeners with the template result for the websocket api (#39925) 2020-09-11 13:18:40 -05:00
Bas Nijholt c2a9a39ee0
Don't trigger on attribute when the attribute doesn't change (#39910)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-09-11 14:02:17 +02:00
Martin Hjelmare e96fed20c8
Add children media class (#39902)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-09-11 13:08:13 +02:00
Paulus Schoutsen 5117a16841
Extract variable rendering (#39934) 2020-09-11 12:24:16 +02:00
J. Nick Koston 9389a7c9be
Limit zeroconf discovery to name/macaddress when provided (#39877)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-09-11 12:19:21 +02:00
J. Nick Koston bf1ad0a757
Prevent missing integration from failing HomeKit startup (#39918) 2020-09-10 23:19:11 +02:00
Erik Montnemery 4d6e694d14
Fix discovery update of MQTT state templates (#39901) 2020-09-10 20:52:23 +02:00
J. Nick Koston fd8a4182d9
Detect self-referencing loops in template entities and log a warning (#39897) 2020-09-10 20:50:11 +02:00
Paulus Schoutsen aa9dff572e
Add default variables to script helper (#39895) 2020-09-10 20:41:42 +02:00
RogerSelwyn 162c39258e
Add Carbon Monoxide binary sensor to Homekit Controller (#39889) 2020-09-10 12:25:14 +01:00
Franck Nijhof 14f7f5ba45
Remove stale debug from WLED tests (#39882) 2020-09-10 13:16:33 +02:00
Paulus Schoutsen bb661ad083
Fix event trigger (#39884)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2020-09-10 11:25:56 +02:00
Franck Nijhof b70df4ab18
Disable Met.no hourly weather by default (#39867)
Co-authored-by: Daniel Hjelseth Høyer <mail@dahoiv.net>
2020-09-10 07:58:40 +02:00
Aaron Bach 0e11c10468
Prompt user to reauthenticate AirVisual when API key expires (#38341)
* Prompt user to reauthenticate AirVisual when API key expires

* Don't version bump

* Cleanup

* Linting
2020-09-09 16:41:07 -06:00
Chris 1f000e2c3e
Allow setting of hvac_mode when setting temperature in ozw (#39853) 2020-09-09 17:08:43 +02:00
Chris Talkington 74219663d6
Fix nzbget sensors (#39833)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-09-09 14:56:40 +02:00
Erik Montnemery 9aba1985c7
Fix MQTT light value template (#39820) 2020-09-08 23:11:42 +02:00
J. Nick Koston 4bbd69955b
Restore missing device_class to template binary_sensor (#39805) 2020-09-08 17:12:23 +02:00
J. Nick Koston 0507ec9d8b
Fix cover template entities honoring titlecase True/False (#39803) 2020-09-08 17:08:31 +02:00
Martin Hjelmare 586d7eaba6
Add media class browse media attribute (#39770) 2020-09-08 16:42:01 +02:00
Franck Nijhof 8e4710a2a9
Remove deprecated Hue configuration (#39800) 2020-09-08 15:52:04 +02:00
Paulus Schoutsen c6cba5ebc8
Remove HTML support from frontend (#39799) 2020-09-08 15:42:50 +02:00
J. Nick Koston a495946eeb
Add the ability to reload bayesian platforms from yaml (#39771) 2020-09-08 09:41:17 +02:00
Tom bb9ea7ce6e
Add tests for Plugwise integration (#36371) 2020-09-08 08:37:44 +02:00
Bram Kragten 4b01ab616a
Timer make attribute format always h:mm:ss (#38292)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-09-07 19:12:52 +02:00
Franck Nijhof 7c86fa0203
Support 'for' without setting the 'to'-state in automation state triggers (#39730) 2020-09-07 16:30:02 +02:00
Anders Melchiorsen 4b84b74b89
Support state trigger with from/for but no to (#39480) 2020-09-07 16:08:24 +02:00
Chris Talkington 8a3279a5c9
Add device action support for remotes (#39400) 2020-09-07 08:54:18 -05:00
Tom f6aa3e0cdc
Improve Plugwise config_options testing (#39736) 2020-09-07 14:13:47 +02:00
Andrew Marks d0af3339fc
Add unique_id to jewish_calendar entities (#39025) 2020-09-06 20:29:17 -05:00
J. Nick Koston 4779916ac4
Set DEVICE_CLASS_GATE for iSmartGate gates (#39703) 2020-09-06 18:55:20 -05:00
Robert Svensson 41abc08d63
Axis - Improve naming of some events (#39699)
* Add support for events from Loitering guard and Motion guard
* Improve naming of events originating from applications Fence guard and VMD4 (Loitering guard and motion guard also benefit from this)
2020-09-06 23:26:06 +02:00
Bouwe Westerdijk 61e8ab1300
Add Plugwise scan_interval config option (#37229)
Co-authored-by: Tom Scholten <tom@sue.nl>
Co-authored-by: Tom Scholten <git@scholten.nu>
2020-09-06 15:26:14 -05:00
fillefilip8 8af64456ec
Add number parsing for OpenHardwareMonitor (#39030) 2020-09-06 20:49:54 +02:00
J. Nick Koston d7e471e244
Add HomeKit discovery for iSmartGate (#39702) 2020-09-06 12:56:38 -05:00
Franck Nijhof a3c45a6f89
Add shorthand notation for Template conditions (#39705) 2020-09-06 16:55:06 +02:00
Paulus Schoutsen df8daf561e
Browse media class (#39698) 2020-09-06 15:52:59 +02:00
Chris Talkington 13a6aaa6ff
Add media browser support to roku (#39652)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-09-06 14:53:45 +02:00
Martin Hjelmare 36632f64f1
Mock tradfri lights correctly (#39706) 2020-09-06 11:54:08 +02:00
Joakim Plate 74fea6d306
Add Arcam radio media browsing (#39593) 2020-09-06 00:10:18 +02:00
Martin Hjelmare b6630a48b2
Add tradfri api call error handling (#39681)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2020-09-05 23:02:32 +02:00
MatthewFlamm 958c9c08d6
Use more homeassistant constants in NWS (#39690) 2020-09-05 21:11:15 +02:00
springstan d2b1918e9c
Drop UNIT_ prefix for percentage constant (#39383) 2020-09-05 21:09:14 +02:00
Robert Van Gorkom b860caa631
Add iSmartGate support (#39437)
* Add iSmartGate support.

* Addressing PR feedback.

* More PR feedback cleanups.
2020-09-05 09:26:01 -05:00
Martin Hjelmare 52c09396e0
Fix monoprice option flow test (#39685) 2020-09-05 15:25:22 +02:00
Keilin Bickar 3022fc4702
Add Emulated Kasa Integration (#39630)
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-09-05 07:57:45 -05:00
Rob Bierbooms 8567fe94e1
Add connection validation on import for dsmr integration (#39664) 2020-09-05 12:05:46 +02:00
Evgeny b0192cf9c0
Add OpenWeatherMap config_flow (#34659)
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-09-04 18:22:50 -05:00
Andrew Marks 01bac9f433
Refactor sharkiq tests (#39564)
* Refactor sharkiq tests

* Fix linting

* Remove unussed logger

* Test one more code branch

* Don't patch integration files

* Remove legacy calls

* Linting fixes

* Refactor coordinator update tests

* Reformat test params

* Refector config flow tests

* Minor code cleanup

* Fix spelling error

* Address review

* Minor formatting change

* Remove vacuum.py from .coveragerc
2020-09-04 15:13:11 -05:00
Charles Garwood 4885b22cb4
Improve ozw websocket response when node is not found (#39653)
* Return not_found error over ws if node is not found

* Remove unrelated code from this PR

* Only import ERR_NOT_FOUND from core websocket_api
2020-09-04 15:52:47 -04:00
On Freund ad6e8b2d62
Add event sensors for risco (#39594)
* Add Risco event sensors

* Fix lint
2020-09-04 14:11:07 -05:00
J. Nick Koston 9b23d7c2fd
Use the shared Zeroconf instance in esphome (#38747) 2020-09-04 21:01:41 +02:00
cgtobi 84944cfc24
Add Netatmo media browser support (#39578) 2020-09-04 20:21:42 +02:00
Jason Hunter f2b3e63ff6
Media Source implementation for Chromecast (#39305)
* Implement local media finder and integrate into cast

* update to media source as a platform

* Tweak media source design

* fix websocket and local source

* fix websocket schema

* fix playing media

* Apply suggestions from code review

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

* Add resolve_media websocket

* Register that shit

* Square brackets

* Sign path

* add support for multiple media sources and address PR review

* fix lint

* fix tests from auto whitelisting config/media

* allow specifying a name on the media source

* add tests

* fix for python 3.7

* Apply suggestions from code review

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

* add http back to cast and remove guess_type from executor as there is no i/o

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-09-04 11:16:29 -04:00
jjlawren f01a0f9151
Allow separate URL for REST switch state (#39557) 2020-09-04 16:58:40 +02:00
J. Nick Koston ebc31c0f08
Do not treat nexia http not found as invalid auth (#39484)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-09-04 16:54:27 +02:00
jjlawren dd7f282723
Add new Plex movie lookup method for media_player.play_media (#39584) 2020-09-04 11:32:36 +02:00
Chris Talkington 48cfbf8662
Improve broadlink sensor tests (#39632) 2020-09-03 20:01:15 -05:00
Felipe Martins Diel 353b40b28a
Add tests for Broadlink remotes (#39235)
* Add tests for Broadlink remotes

* Reformat the tests with Black

* Add a helper method for device setup

* Rename device.setup() to device.setup_entry()

* Apply suggestions from code review

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-09-03 16:51:08 -05:00
Chris Talkington f6a3eea7f2
Add device class to directv devices (#39628)
* add device class to directv devices

* Update test_media_player.py

* Update media_player.py

* Update test_media_player.py

* Update media_player.py
2020-09-03 23:27:13 +02:00
Rob Bierbooms d0120d5e0a
Update DSMR integration to import yaml to ConfigEntry (#39473)
* Rewrite to import from platform setup

* Add config flow for import

* Implement reload

* Update sensor tests

* Add config flow tests

* Remove some code

* Fix pylint issue

* Remove update options code

* Add platform import test

* Remove infinite while loop

* Move async_setup_platform

* Check for unload_ok

* Remove commented out test code

* Implement function to check on host/port already existing

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

* Implement new method in import

* Update tests

* Fix test setup platform

* Add string

* Patch setup_platform

* Add block till done to patch block

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-09-03 16:19:45 -05:00
Chris Talkington 77f5fb765b
Add device class for roku devices (#39627)
* add tv device class for roku tvs

* Update test_media_player.py

* Update test_media_player.py

* Update media_player.py

* Update test_media_player.py

* Update media_player.py

* Update test_media_player.py

* Update test_media_player.py

* Update media_player.py
2020-09-03 17:06:24 -04:00
Chris Talkington c1b8497aaa
Improve sonarr sensor test (#39623)
* improve sonarr sensor test

* Update test_sensor.py

* Update test_sensor.py

* Update test_sensor.py

* Update test_sensor.py

* Update test_sensor.py

* Update test_sensor.py
2020-09-03 15:32:48 -05:00
Martin Hjelmare bde0bdbf80
Clean tradfri hass data and add tests (#39620) 2020-09-03 18:39:24 +02:00
Joakim Plate d128443a2a
Google assistant openclose (#39612)
* Make sure we set discreteOnlyOpenClose for binary sensors

* Mark switches that are assumed state as commandOnlyOnOff

* Drop stray extra line

* Fix pylint error

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
2020-09-03 18:32:57 +02:00
Eric Severance 9baa7c6c24
Restart keepalive streams (#38863) 2020-09-03 12:22:00 -04:00
Paulus Schoutsen fbbfd46fb8
Add .well-known/password-change (#39613) 2020-09-03 18:13:33 +02:00
SukramJ 4dee2b599a
Add HmIP-STV to HomematicIP Cloud (#39518)
* add general attribute for connection type

* Add HmIP-STV to HomematicIP Cloud
2020-09-03 17:23:42 +02:00
SukramJ f2f68859cc
Fix wrong error message on adding a new HomematicIP Cloud AP (#39599) 2020-09-03 09:52:51 +02:00
jjlawren aecd74c6af
Add service to scan for new Plex clients (#39074) 2020-09-03 09:35:37 +02:00
Maciej Bieniek 226406b853
Improve tests for GIOS integration (#39514) 2020-09-03 09:27:21 +02:00
jjlawren d66bc6a873
Add Recently Added and On Deck to Plex media browser (#39232) 2020-09-03 09:26:30 +02:00
J. Nick Koston 65e53b8251
Support reloading mqtt yaml configuration (#39531) 2020-09-02 20:16:21 -05:00
J. Nick Koston 56e76a3265
Support reloading the smtp notify platform (#39530)
* Support reloading the smtp notify platform

* patch test
2020-09-02 19:43:07 -05:00
J. Nick Koston 93555fed75
Support reloading the telegram notify platform (#39529)
* Support reloading the telegram notify platform

* services.yaml
2020-09-02 19:08:47 -05:00
J. Nick Koston 661b593db3
Support reloading the rest notify platform (#39527)
* Support reloading the rest notify platform

* update services.yaml

* fix conflict
2020-09-02 18:25:43 -05:00
J. Nick Koston a778690b64
Support reloading the group notify platform (#39511) 2020-09-03 00:12:07 +02:00
jjlawren cb1cf2238d
Add Plex service to refresh a library (#39094)
* Add Plex service to refresh a library

* Clean up rebase leftovers

* Re-run black

* Fix docstring

Co-authored-by: Charles Garwood <cgarwood@newdealmultimedia.com>

Co-authored-by: Charles Garwood <cgarwood@newdealmultimedia.com>
2020-09-02 13:56:41 -05:00
Charles Garwood 5fafaa3c4f
Add get_migration_config to zwave websocket api (#39577)
* Add get_migration_config to zwave websocket api

* Add test
2020-09-02 18:56:09 +02:00
Xiaonan Shen 7b3182fa8f
Improve Yeelight code (#39543)
* Rename ipaddr to ip_addr

* Move custom services to entity services

* Remove platform data

* Change service setup to callback

* Rename ip_addr to host

* Use _host inside class
2020-09-02 18:42:12 +02:00
Raman Gupta 04c849b0ee
Remove vizio test assertions for integration details in test_init (#39579) 2020-09-02 18:38:53 +02:00
J. Nick Koston 45c28dd9c5
Provide a logbook option entity_matches_only to optimize for single entity lookup (#39555)
* Provide a logbook option entity_matches_only to optimize for single entity id lookup

When entity_matches_only is provided, contexts and events that do not
contain the entity_id are not included in the logbook response.

* Update homeassistant/components/logbook/__init__.py

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

* api only takes a single entity

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-09-02 10:32:08 -05:00
Paulus Schoutsen 6de02fc1b9
Fix some more usages of asynctest (#39570) 2020-09-02 14:53:07 +02:00
Martin Hjelmare 24f63127de
Fix vizio black formatting (#39573) 2020-09-02 14:16:23 +02:00
Joakim Plate ec6a1f9137
Add support for receiver and speaker device classes (#38381)
These are now officially supported by google
2020-09-02 11:59:51 +02:00
Raman Gupta 7ff633f531
Automatically update app list for Vizio SmartTV's (#38641) 2020-09-02 11:55:10 +02:00
Paulus Schoutsen 78b0837cb8
Remove flaky wol test that didn't test anything (#39571) 2020-09-02 11:50:00 +02:00
Erik Montnemery 4c6960ed36
Fix discovery update of MQTT light (#39325) 2020-09-02 10:52:33 +02:00
J. Nick Koston 3e9963a216
Overcome group concurrent setup limitation (#39483)
With a lot of groups the limitation that groups
had to be setup one at a time could account for
the bulk of startup time.
2020-09-02 10:14:16 +02:00
J. Nick Koston 557684c3ce
Add ability to disable the sqlite3 quick_check (#39479) 2020-09-02 10:12:56 +02:00
Chris Talkington e921f72d31
Use media state to better represent roku state (#39540)
* use media state to better represent roku state

* Update media_player.py

* Update media_player.py

* Update media_player.py

* Update media_player.py

* Update media_player.py

* Update media_player.py

* Update media_player.py

* Update media_player.py

* Update test_media_player.py

* Update test_media_player.py

* Update test_media_player.py

* Update media_player.py

* Update test_media_player.py

* Update test_media_player.py
2020-09-01 20:40:45 -05:00
Arda ŞEREMET 1eda3d31f9
Apply code review on progettihwsw (#39520) 2020-09-01 19:42:17 +02:00
Andrew Marks 064d115ccb
Address open review issues in sharkiq integration (#39504) 2020-09-01 17:51:27 +02:00
Jean-Yves Avenard cf4b6307ae
Provide compatibility with older Home Assistant installations. (#39539)
Prior 0.113 all lights and switches were reported as dimmable devices and this was fixed by #37978.
However, under some circumstances Alexa will not smoothly transition from those broken devices to the new ones as it cache the list of entities.
It is imperative to have Alexa rediscover all devices and then remove the now non-responding duplicates using the Alexa phone App. This can take quite a while if you have lots of devices.
An alternative would be to log to the Alexa web site and remove all the lights instead and then re-discover them all.

If you have multiple echo devices on your network, it is possible that the entries would continue to show as duplicates. This is due to an individual echo devices caching the old list and re-using it.
The only known solution for this is to remove your echo devices from your Amazon account and re-add them.
After that, have Alexa rediscover all your devices.

This is a one-off requirement.

Fixes #39503
2020-09-01 09:16:40 -05:00
On Freund 963651d6f2
Add support for authenticated Shelly devices (#39461)
* Add support for authenticated Shelly devices

* Fix comment typos

* Update homeassistant/components/shelly/config_flow.py

Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com>

* Fix unauthenticated devices

* Update homeassistant/components/shelly/config_flow.py

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

* Code review fixes

* More code review fixes

* Fix typo

* Update homeassistant/components/shelly/config_flow.py

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

Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-09-01 08:08:37 -04:00
SukramJ 5de1d04b6e
Bump dependency to 0.11.0 for HomematicIP Cloud (#39508)
* Bump dependency to 0.11.0 for HomematicIP Cloud

* Update test data
2020-08-31 18:18:12 +02:00
Xiaonan Shen 45a927ffb2
Add config flow to yeelight (#37191) 2020-08-31 16:40:56 +02:00
David F. Mulcahey 7062838940
Add entity services to the Flo integration (#38287)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-08-31 15:37:45 +02:00
Franck Nijhof 97e1be98df
Upgrade sentry-sdk to 0.17.1 (#39495) 2020-08-31 10:28:52 +02:00
Eugene Prystupa b71cbd2033
Fix a problem with set_speed(off) when direct HA API for set speed is called (#39488) 2020-08-30 21:10:15 -05:00
Chris Talkington e1c7c3fdb2
Ensure patching applies while testing marytts (#39490)
* ensure patching applies while testing marytts

* Update test_tts.py
2020-08-30 21:04:49 -05:00
Tom Harris 75153dd4a3
Apply code review for insteon config flow (#39171)
* Move options import to async_setup_entry

* Add tests for insteon init

* Move common constants to const

* Clean up to adhear to standards

* Create mock insteon device manager

* Update for HA standards

* Use keys and align to config_flow steps

* Fix default port for hub v1

* Update doc string to represent function

* Remove dump print commands

* Add modem_type entry

* Simplify dict key test

* Setup platforms in async_setup_entry

* Black

* Black tests
2020-08-30 19:15:09 -04:00
Arda ŞEREMET e707b50658
Add integration for ProgettiHWSW automation boards (#37922)
* Opened a new fresh page to clean my mess.

* Solved pylint warnings

* Fixing pylint issue of defining attr outside init.

* Excluded files from being tested by codecov.

* Solved binary sensor error.

* Fixed some stylisation errors.

* Resolved input not updating problem.

* Added port entry to test file.

* Added tests for create_entry.

* Added support for better state management.

* Increased code coverage of config_flow.py & made some tweaks.

* Increased coverage of config_flow.py by adding tests for unknown exceptions.

* A small bugfix.

* Stylised code as per Chris' suggestions.

* Stylised code again.

* Improved quality of test code.

* Added step_id in config flow tests.
2020-08-30 15:03:33 -05:00
J. Nick Koston 4bbc737954
Fix light device trigger test flapping (#39470) 2020-08-30 14:34:16 -05:00
Chris Talkington 65a9e18b27
Improve patching in marytts tests (#39458)
* improve patching in marytts tests

* Update test_tts.py

* Update test_tts.py

* Update test_tts.py

* Update test_tts.py

* Update test_tts.py

* Update test_tts.py
2020-08-30 13:58:25 -05:00
J. Nick Koston 56ddbd87b2
Fix recorder test intermittently failing (#39468) 2020-08-30 13:58:00 -05:00
springstan 4294d10789
Format sharkiq with black (#39422) 2020-08-30 08:56:59 -05:00
Andrew Marks 3d1ff5b8d0
Add sharkiq integration for Shark IQ robot vacuums (#38272)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-08-30 15:26:11 +02:00
Paulus Schoutsen ab7b42c022
Google: Recover from an entity raising while serializing query (#39381)
Co-authored-by: Joakim Plate <elupus@ecce.se>
2020-08-30 15:19:56 +02:00
Paulus Schoutsen ba75856f2b
Do not break Alexa sync when encounter bad entity (#39380) 2020-08-30 14:36:00 +02:00
J. Nick Koston dda4cf4d58
Tune logbook performance to accomodate recent changes (#39348) 2020-08-30 09:20:31 +02:00
Jeff Irion ad0d3b4848
Improve handling of exceptions in Android TV (#39229)
* Close the ADB connection when there is an exception

* Add a test

* Split a comment onto two lines

* Fix test ('async_update' -> 'async_update_entity')

* 'close' -> 'Close'
2020-08-29 21:56:25 -05:00
Eugene Prystupa 867d5088e3
Fix bond fan.turn_on with OFF speed (#39387) 2020-08-29 17:03:19 -05:00
Chris Talkington 7469f57a7b
Add config flow to nzbget (#38938)
* work on config flow

* Update test_init.py

* work on config flow

* Update test_config_flow.py

* Update test_config_flow.py

* Update __init__.py

* Update test_config_flow.py

* Update __init__.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Apply suggestions from code review

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

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update config_flow.py

* Update __init__.py

* Update __init__.py

* Create coordinator.py

* Update __init__.py

* Update sensor.py

* Update __init__.py

* Update .coveragerc

* Update coordinator.py

* Update __init__.py

* Update coordinator.py

* Update __init__.py

* Update coordinator.py

* Update config_flow.py

* Update __init__.py

* Update coordinator.py

* Update __init__.py

* Update test_config_flow.py

* Update coordinator.py

* Update test_config_flow.py

* Update test_init.py

* Update homeassistant/components/nzbget/coordinator.py

* Update test_config_flow.py

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-08-29 16:47:00 -05:00
Paulus Schoutsen 8302a7879e
Catch bad devices when Google Sync (#39377) 2020-08-29 13:09:50 +02:00
Ville Skyttä 6ae9399237
Upgrade isort to 5.4.2 (#37939) 2020-08-29 08:23:55 +02:00
J. Nick Koston 67de1d3466
Fix sun test to patch time since it is now refetched (#39372)
This accounts for the fix in #39335
2020-08-28 22:06:06 -05:00
Chris Talkington 4682de5ac1
Improve patching in broadlink sensor tests (#39366)
* improve patching in broadlink sensor tests

* Update test_sensors.py

* Update test_sensors.py
2020-08-28 21:26:19 -05:00
Daniel Shokouhi d587f134ca
Reload mobile app notify service upon device name change, add device name to all webhook logs (#39364)
* Add device name to all webhook logs to help with multiple devices

* Reload notifications when we update the registration, update from rebase

* Make hassfest happy

* Adjust caplog test to accomodate log message change

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-08-28 15:13:43 -05:00
Rob Bierbooms 5658a1efec
Increase test coverage for rfxtrx integration (#39340)
* Increase switch coverage

* Increase binary sensor coverage

* Final improvements

* Remove debug statement

* Adjust test duplicate cover

* Remove None return test

* Assert on length of conf_entries

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

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-08-28 15:05:11 -05:00
Phil Bruckner b315df2118
Reduce automation state changes by using script helper's last_triggered attribute (#39323) 2020-08-28 14:51:15 -05:00
J. Nick Koston 92c06f0818
Ensure mobile_app notifications get re-registered after adding,removing,adding (#39362) 2020-08-28 14:08:09 -05:00
J. Nick Koston 57848cdf35
Add the ability to reload ping platforms from yaml (#39344) 2020-08-28 12:40:30 -05:00
J. Nick Koston 85869be2d8
Unregister mobile_app notification services when a device is removed (#39359) 2020-08-28 12:37:19 -05:00
J. Nick Koston 3377f6b12a
Register mobile_app notification services when a new device is added (#39356)
* Register mobile_app notification services when a new device is added

* targets and base service use their own patterns to generate the name
2020-08-28 12:18:02 -05:00
Paulus Schoutsen d9f3bdea53 Black 2020-08-28 15:33:08 +00:00
J. Nick Koston d2195e2b37
Add support for reloading min_max from yaml (#39327)
* Add support for reloading min_max from yaml

* git add
2020-08-28 10:23:19 -05:00
Phil Bruckner e6141ae558
Add description of what caused an automation trigger to fire (#39251)
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-08-28 17:02:12 +02:00
Paulus Schoutsen 5217139e0b
Allow exposing domains in cloud (#39216) 2020-08-28 16:49:17 +02:00
J. Nick Koston 414a59ae9f
Add the ability to reload homekit from yaml (#39326) 2020-08-28 16:46:45 +02:00
J. Nick Koston 400741006b
Add the ability to reload generic platforms from yaml (#39289) 2020-08-28 16:44:51 +02:00
Chris Talkington 98db0a2d2e
fix black on generic_thermostat tests (#39350) 2020-08-28 00:24:11 -05:00
J. Nick Koston f914625b8a
Add the ability to reload history_stats platforms from yaml (#39337)
* Add the ability to reload history_stats platforms from yaml

* Increase coverage and cleanup

* Fix coverage

* services.yaml
2020-08-28 00:22:43 -05:00
SukramJ b5c2c9ec9b
Add device attribute for homematicip_cloud rotary handle (#39144) 2020-08-28 00:08:37 -05:00
J. Nick Koston 77490287e9
Add the ability to reload generic_thermostat platforms from yaml (#39291) 2020-08-27 23:59:49 -05:00
J. Nick Koston f449620d38
Add the ability to reload filesize platforms from yaml (#39347) 2020-08-27 23:53:27 -05:00
J. Nick Koston 0db5bb27a8
Add the ability to reload trend platforms from yaml (#39341) 2020-08-27 23:50:28 -05:00
On Freund b14af3e727
Add Custom mapping of Risco states (#39218)
* Custom mapping of Risco states

* More informative error log

* Add alternative Risco terms

* Black formatting
2020-08-27 21:23:01 -05:00
On Freund 24db31fa28
Add (un)bypass services to Risco (#39292)
* Add (un)bypass services to Risco

* Simplify service registration
2020-08-27 20:39:27 -05:00
Charles Garwood c2365b8c0f
Add get_nodes command to OZW websocket api (#39317)
* Add get_nodes command to OZW websocket api

* Fix black

* Use constants for get_nodes and get_node

* Missed a couple constants
2020-08-27 14:00:22 -04:00
cgtobi c8d49a8adf
Add Spotify media browser capability (#39240)
Co-authored-by: Tobias Sauerwein <cgtobi@gmail.com>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2020-08-27 17:00:36 +02:00
Franck Nijhof 1c2ebdf307
Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
Felipe Martins Diel e4d29bf3ec
Add tests for Broadlink sensors (#39230)
* Add tests for Broadlink sensors

* Remove sensor.py from .coveragerc
2020-08-26 22:43:17 -05:00
Paulus Schoutsen 6348884735
Allow passing in user id instead of username to change password (#39266) 2020-08-26 23:37:33 +02:00
jjlawren 1bc4de2bd3
Add tests for Plex media browser (#39220) 2020-08-26 23:24:44 +02:00
J. Nick Koston 79f4b6eb6b
Cleanup the rest reload test to use the pytest requests_mock fixture (#39282) 2020-08-26 17:53:11 +02:00
Paulus Schoutsen 51a63c1fc4
Drop last bits of asyncio.coroutine (#39280) 2020-08-26 16:57:52 +02:00
J. Nick Koston dc84196202
Add the ability to reload statistics platforms from yaml (#39268) 2020-08-26 14:52:19 +02:00
Phil Bruckner 4ff376cdd6
Add timestamp option for input_datetime.set_datetime (#39121) 2020-08-26 11:28:30 +02:00
Maciej Bieniek 2568932c1c
Bump brother library to version 0.1.15 (#39226) 2020-08-26 10:55:57 +02:00
J. Nick Koston eaac00acfc
Add the ability to reload filter platforms from yaml (#39267)
* Add the ability to reload filter platforms from yaml

* force in memory db

* fix listener leak on un-load
2020-08-25 20:55:45 -05:00
J. Nick Koston 215e3f2dab
Add the ability to reload command_line platforms from yaml (#39262) 2020-08-25 19:52:36 -05:00
J. Nick Koston 5018e53b33
Add the ability to reload the rest platforms from yaml (#39257)
* Add the ability to reload rest platforms from yaml

* Revert changes to notify as these will be done in another pass
2020-08-25 19:05:29 -05:00
SukramJ 758c0adb5e
Rename entity base class for HMIPC (#39243) 2020-08-26 01:55:55 +02:00
J. Nick Koston 810df38f0d
Add the ability to reload light/cover groups from yaml (#39250)
* Add the ability to reload light/cover groups from yaml

Update previous usage to reduce code duplication.

* Fix conflict from rebase
2020-08-25 18:13:43 -05:00
J. Nick Koston e109b04efe
Add api to reload config entries (#39068) 2020-08-26 00:59:22 +02:00
bsmappee 11f121b008
Implement local discovery of Smappee series-2 devices and improvements (#38728)
* prepare local api support for Smappee2-series

* Series-2 devices are now supported

* remove switch scan_interval
2020-08-26 00:37:53 +02:00
J. Nick Koston 90842fcb84
Support reloading the universal platform (#39248) 2020-08-26 00:25:15 +02:00
J. Nick Koston 63ebea1706
Ensure the context is passed to group changes (#39221) 2020-08-26 00:22:10 +02:00
J. Nick Koston 20398cc0a6
Subscribe to state change events only if the template has entities (#39188) 2020-08-26 00:20:04 +02:00
Daniel Hjelseth Høyer 7bc273b182
Remove yr integration after a request from yr.no (#39247) 2020-08-25 21:18:45 +02:00
Yuxiang Zhu 19cc168433
Add HomeKit Controller heater-cooler devices (#38979)
Some new HomeKit climate devices, like XiaoMi Air Conditioning Controller P3 are heater-cooler devices rather than
thermostat devices. This commit adds support for the heater-cooler class via homekit_controller.
2020-08-25 17:56:01 +01:00
Chris Talkington ab6fb5cb77
Ensure unique ids are generated for surepetcare (#39196)
* ensure unique ids are generated for surepetcare

* Create test_binary_sensor.py

* work on tests

* Update test_binary_sensor.py

* Update __init__.py

* Update __init__.py

* Update test_binary_sensor.py

* Update test_binary_sensor.py

* Update test_binary_sensor.py

* Update test_binary_sensor.py

* Update test_binary_sensor.py

* Update test_binary_sensor.py

* Update __init__.py
2020-08-25 11:34:14 -05:00
Erik Montnemery 114a7226d6
Wait before sending MQTT birth message (#39120)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-08-25 16:42:24 +02:00
Paulus Schoutsen 415213a325
Add support for attributes in state/numeric state trigger (#39238) 2020-08-25 16:21:16 +02:00
Pascal Vizeli 342e84e550
Fix TTS languange characters (#39211) 2020-08-25 14:23:21 +02:00
Paulus Schoutsen 9979e465aa
Fix hassio auth data (#39244)
Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
2020-08-25 14:22:50 +02:00
Paulus Schoutsen 13df3bce1b
Allow owner users to change password of any user (#39242) 2020-08-25 13:49:32 +02:00
Paulus Schoutsen 2a1fe9d29a
Add websocket trigger/condition commands (#39109) 2020-08-24 23:01:57 +02:00
J. Nick Koston 6b7a7939d2
Include the first seen context data in the logbook api (#39194)
* Include the context_entity_id in the logbook api

context_entity_id is the first entity seen during
a time period that includes the context

* update test

* more of them

* include friendly name

* pylint wants a ternary

* Refactor

* performance

* fix homekit context

* Fix self describing events

* Fix external_events
2020-08-24 12:44:40 -05:00
Leonardo Figueiro a47f73244c
Add Wilight integration with SSDP (#36694)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-08-24 14:15:07 +02:00
Paulus Schoutsen e61f7f0274
100% test coverage for Shelly config flow (#39209) 2020-08-24 13:39:23 +02:00
Paulus Schoutsen ca2bc9906d
Add Shelly integration (#39178) 2020-08-24 12:43:31 +02:00
jjlawren 6d95ee7a00
Websocket media browsing for Plex (#35590)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-08-24 12:41:01 +02:00
Paulus Schoutsen 71acb2c665
Only reload config entry if it is loaded (#39202) 2020-08-24 10:54:26 +02:00
Chris 7462d140af
Trim CW from RGB when not supported in ozw (#39191)
* Trim the CW value if CW isn't supported

* Trim CW from white level as well
2020-08-23 19:20:37 -04:00
On Freund 15c101e85d
Add pin code support to the Risco integration (#39177)
* Pin code support for Risco

* Remove unused parameter

* Fix imports

* Fix typo

* Apply suggestions from code review

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

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-08-23 12:34:30 -05:00
Fritiof Hedman 961f36c679
Add ZwaveStringSensor to OZW integration (#38676)
* Add ZwaveStringSensor to OZW integration

* Remove unnecessary new line

* Set enabled default to false for ZwaveStringSensor

* Add missing decorator for property

* Add a test for ZwaveStringSensor

* Also test state of ZWaveStringSensor

* Remove entity type check
2020-08-23 15:16:26 +02:00
J.P. Hutchins 62b1f23328
Allow multiple config entries per host for transmission (#39127)
* Allow multiple integrations per host (check port) #36605

* Add test for allow multiple config entries per host for transmission
2020-08-23 13:29:44 +02:00
J. Nick Koston b68c5cec94
Convert bayesian binary_sensor to use async_track_template_result (#39174)
Add coverage to reach 100% line coverage
2020-08-23 09:59:26 +02:00
J. Nick Koston 42227c1c53
Improve the performance of dt_util.utcnow() (#39145) 2020-08-23 09:57:58 +02:00
J. Nick Koston 3cc099af80
Make emulated_hue upnp responder async (#39126) 2020-08-23 09:50:59 +02:00
Chris Talkington dfa18b4b6a
Fix unmocked calls in melcloud (#39170)
* fix unmocked calls in melcloud

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py
2020-08-22 18:31:53 -05:00
On Freund 3198233b8f
Add binary sensors to Risco integration (#39137)
* Add binary sensors to Risco integration

* Minor cleanups

* RiscoEntity base class

* Platinum score

* Remove alarm parameter in _setup_risco

* Avoid zones and partitions sharing unique ids
2020-08-22 18:30:26 -05:00
J. Nick Koston 9baf3ff706
Update universal media_player to use async_track_template_result (#39054)
* Update universal media_player to use async_track_template_result

* Review comments and add missing test cover
2020-08-22 18:12:53 -05:00
On Freund f075742a86
Address Kodi code review follow up (#39104)
* Code review follow up

* Update config_flow.py

* Update config_flow.py

* Update strings.json

* Update config_flow.py

* Update config_flow.py

* Update config_flow.py

* Update config_flow.py

* Update config_flow.py

* Update config_flow.py

* Update util.py

* Update test_config_flow.py

* Update config_flow.py

* Update util.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update util.py

* Update test_config_flow.py

* Update config_flow.py

* Update config_flow.py

* Update config_flow.py

* Update config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-08-22 13:40:12 -05:00
Franck Nijhof 3c1c6069da
Fix Sentry user context and system info (#39130) 2020-08-22 19:51:39 +02:00
On Freund cdb6161d3d
Add risco options flow (#39154) 2020-08-22 12:15:03 -05:00
On Freund e3ce699d75
Risco code review follow ups (#39143) 2020-08-22 15:54:12 +02:00
J. Nick Koston 45401d4308
Fix flapping recorder last run test (#39134) 2020-08-22 09:35:18 +02:00
On Freund 1b8d9f7cc4
Add Risco integration (#36930)
* Risco integration

* Fix lint errors

* Raise ConfigEntryNotReady if can't connect

* Gracefully handle shutdown

* pass session to pyrisco

* minor change to init

* Fix retries

* Add exception log

* Remove retries

* Address code review comments

* Remove log
2020-08-21 23:49:09 -05:00
J. Nick Koston 83b9c6188d
Make template entities reloadable (#39075)
* Make template entities reloadable

* Address review items
2020-08-21 18:31:48 -05:00
Charles Garwood 993088d26e
Add OZW network_statistics websocket command (#39124)
* Add network_statistics websocket command

* Add tests
2020-08-21 22:52:03 +02:00
Graham Wetzler 32db1d1eb2
Improve tests and config flow for Smart Meter Texas (#39089)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-08-21 19:20:42 +02:00
Charles Garwood 52d949ec90
Tweak OZW Websocket Instance/Network Responses (#39107) 2020-08-21 18:48:56 +02:00
Erik Montnemery 91ba8c0ef0
Warn when casting of tts fails (#38603)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-08-21 17:17:36 +02:00
Erik Montnemery ee043d8614
Wait for broker to ACK MQTT operations (#39051)
* Wait for broker to ACK MQTT operations

* Deduplicate new code

* Fix tests

* Improve test

* Don't hold PAHO lock when waiting for ACK

* Fix tests

* Add constant for ACK timeout
2020-08-21 17:00:13 +02:00
J. Nick Koston 5a9246468e
Prevent invalid data from being passed to zeroconf (#39009) 2020-08-21 14:31:17 +02:00
J. Nick Koston 7c346c2f7c
Skip the sqlite quick_check on clean restarts (#38972) 2020-08-21 14:20:46 +02:00
J. Nick Koston f560256546
Update websocket api to use async_track_template_result (#39057) 2020-08-21 14:04:29 +02:00
J. Nick Koston 7878d97588
Use SimpleQueue for recorder (#38967)
Now that python 3.7 is the minimum supported version, we can
use the more efficient SimpleQueue in the recorder as it does
not have to use threading.Lock
2020-08-21 13:54:13 +02:00
Phil Bruckner 76ead858cf
Add wait_for_trigger script action (#38075)
* Add wait_for_trigger script action

* Add tests

* Change script integration to use config validator
2020-08-21 11:38:25 +02:00
On Freund c1ed584f2d
Add config flow to kodi (#38551)
* Add config flow to kodi

* Fix lint errors

* Remove entry update listener

* Create test_init.py

* Apply suggestions from code review

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

* Update __init__.py

* fix indentation

* Apply suggestions from code review

* Apply suggestions from code review

* Update tests/components/kodi/__init__.py

* Fix init test

* Fix merge

* More review changes

* Apply suggestions from code review

* Apply suggestions from code review

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

* Fix black formatting

* Fix Flake8

* Don't store CONF_ID

* Fall back to entry id

* Apply suggestions from code review

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

* Update __init__.py

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-08-20 23:16:58 -05:00
Felipe Martins Diel a2c1f08c8c
Implement config flow in the Broadlink integration (#36914)
* Implement config flow in the Broadlink integration

* General improvements to the Broadlink config flow

* Remove unnecessary else after return

* Fix translations

* Rename device to device_entry

* Add tests for the config flow

* Improve docstrings

* Test we do not accept more than one config entry per device

* Improve helpers

* Allow empty packets

* Allow multiple config files for switches related to the same device

* Rename mock_device to mock_api

* General improvements

* Make new attempts before marking the device as unavailable

* Let the name be the template for the entity_id

* Handle OSError

* Test network unavailable in the configuration flow

* Rename lock attribute

* Update manifest.json

* Import devices from platforms

* Test import flow

* Add deprecation warnings

* General improvements

* Rename deprecate to discontinue

* Test device setup

* Add type attribute to mock api

* Test we handle an update failure at startup

* Remove BroadlinkDevice from tests

* Remove device.py from .coveragerc

* Add tests for the config flow

* Add tests for the device

* Test device registry and update listener

* Test MAC address validation

* Add tests for the device

* Extract domains and types to a helper function

* Do not patch integration details

* Add tests for the device

* Set device classes where appropriate

* Set an appropriate connection class

* Do not set device class for custom switches

* Fix tests and improve code readability

* Use RM4 to test authentication errors

* Handle BroadlinkException in the authentication
2020-08-20 17:30:41 +02:00
J. Nick Koston 5db90478f3
Convert template vacuum to use async_track_template_result (#39047)
* Convert template lock to use async_track_template_result

* Convert template switch to use async_track_template_result

* Convert template fan to use async_track_template_result

* Convert template binary_sensor to use async_track_template_result

Co-Authored-By: Penny Wood <Swamp-Ig@users.noreply.github.com>

* Convert template cover to use async_track_template_result

* Convert template light to use async_track_template_result

* Convert template vacuum to use async_track_template_result

Co-authored-by: Penny Wood <Swamp-Ig@users.noreply.github.com>
2020-08-20 09:30:31 -05:00
J. Nick Koston 5a8013b58c
Convert template binary_sensor to use async_track_template_result (#39027)
Co-Authored-By: Penny Wood <Swamp-Ig@users.noreply.github.com>

Co-authored-by: Penny Wood <Swamp-Ig@users.noreply.github.com>
2020-08-20 09:07:58 -05:00
J. Nick Koston 8813f669c2
Convert template alarm_control_panel to use async_track_template_result (#39014)
* Convert template lock to use async_track_template_result

* Convert template switch to use async_track_template_result

* Convert template fan to use async_track_template_result

* Convert template alarm_control_panel to use async_track_template_result
2020-08-20 08:54:16 -05:00
J. Nick Koston f3d077c1e1
Convert template fan to use async_track_template_result (#38983)
* Convert template lock to use async_track_template_result

* Convert template switch to use async_track_template_result

* Convert template fan to use async_track_template_result
2020-08-20 08:53:45 -05:00
J. Nick Koston d7f54ce98f
Convert template lock to use async_track_template_result (#38946) 2020-08-20 08:32:52 -05:00
J. Nick Koston 1381b279f0
Update template sensor to use async_track_template_result (#38940)
* Add template entity

* Update template tracking to work for template sensors

* add test for whitespace

* Update homeassistant/helpers/config_validation.py

* revert

* fix

* reduce

* fix _refresh missing decorator

* defer until start

* do not throw errors during startup

* defer tracking until start event

Co-authored-by: Swamp-Ig <github@ninjateaparty.com>
2020-08-20 08:06:41 -05:00
Chris Talkington da5dc1130e
Fix slower tests in sonarr (#39073) 2020-08-20 12:21:58 +02:00
Franck Nijhof d3389fa22e
Sentry integration enhancements (#38833)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-08-20 11:37:27 +02:00
J. Nick Koston 4371068f6a
Fix emulated hue on/off devices compatibility with alexa (#39063) 2020-08-20 10:27:14 +02:00
Ivan Belokobylskiy be0f2719e2
Upgrade to aioymaps==1.1.0 to support new types of stops #39006 (#39021) 2020-08-20 05:30:48 +02:00
uvjustin dc2d0b9297
Add audio to stream (#38846)
* Add audio to stream component

* Use container options to do most fmp4 formatting

* Add test for treatment of different audio inputs

* Add test for treatment of different audio inputs

* pcm_mulaw frames should be s16

* Use seek to get BytesIO length

* Remove unused utcnow

* Remove peek_next_audio_pts

* only demux audio and video packets - ignoring data and subtitle streams

Co-authored-by: Jason Hunter <hunterjm@gmail.com>
2020-08-19 23:18:54 -04:00
Felipe Martins Diel fec4966ee0
Clean up feedreader files at the end (#39064) 2020-08-19 16:38:34 -05:00
Graham Wetzler bb164bb32c
Smart Meter Texas integration (#37966)
* Run scaffold script

* Update version

* Bump version

* Initial commit

* Move meter and ESIID to device attributes

* Update internal to hourly due to api limit

* Format with Black

* Fix typo

* Update tests

* Update description

* Disable Pylint error

* Don't commit translations

* Remove meter number from sensor name

* Allow multiple meters per account

* Move data updates to a DataUpdateCoordinator

* Use setdefault to setup the component

* Move strings to const.py

* Fix tests

* Remove meter last updated attribute

* Bump smart-meter-texas version

* Fix logger call

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

* Remove unneeded manifest keys

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

* Remove icon property

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

* Handle instance where user already setup an account

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

* Remove icon constant

* Fix indentation

* Handle config flow errors better

* Use ESIID + meter number as unique ID for sensor

* Update config flow tests to reach 100% coverage

* Avoid reading meters on startup

Cherrypick @bdraco's suggestion

* Run scaffold script

* Update version

* Bump version

* Initial commit

* Move meter and ESIID to device attributes

* Update internal to hourly due to api limit

* Format with Black

* Fix typo

* Update tests

* Update description

* Disable Pylint error

* Don't commit translations

* Remove meter number from sensor name

* Allow multiple meters per account

* Move data updates to a DataUpdateCoordinator

* Use setdefault to setup the component

* Move strings to const.py

* Fix tests

* Remove meter last updated attribute

* Bump smart-meter-texas version

* Fix logger call

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

* Remove unneeded manifest keys

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

* Remove icon property

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

* Handle instance where user already setup an account

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

* Remove icon constant

* Fix indentation

* Handle config flow errors better

* Use ESIID + meter number as unique ID for sensor

* Update config flow tests to reach 100% coverage

* Remove unnecessary try/except block

This checks for the same exception just prior in execution on L51.

* Remove unused return values

* Add tests

* Improve tests and coverage

* Use more pythonic control flow

* Remove all uses of hass.data

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-08-19 13:16:45 -05:00
Charles Garwood 96035ccd6f
Add websocket command to get a list of OZW instances and their status (#39019)
* Add websocket command to get a list of OZW instances and their status

* Add test

* Review comments
2020-08-19 09:37:04 -04:00
Paulus Schoutsen 3dc79aa60a
Track entity sources (#37258)
Co-authored-by: David Mulcahey <david.mulcahey@me.com>
2020-08-19 14:57:38 +02:00
Paulus Schoutsen 24a16ff8fe
Add image integration (#38969) 2020-08-19 11:33:04 +02:00
Franck Nijhof 475e70986b
Extend IP ban / failed login notification information (#39020) 2020-08-18 23:32:19 +02:00
Anders Melchiorsen d4f1fd7396
Improve time_pattern validation schema (#38982) 2020-08-18 21:10:43 +02:00
kbickar 1505343b4b
Update emulated_hue to allow getting bridge config without username (#38986)
* Allow bridge config without username

* Updated emulated_hue tests

* Test cleanup
2020-08-18 14:02:38 -05:00
David F. Mulcahey 1af6c04111
Add triggers for the Tag component (#39004) 2020-08-18 16:22:53 +02:00
Phil Bruckner 5d73714f5a
Fix time trigger test (#38988)
* Fix time trigger test

* Forgot part of fix
2020-08-18 07:37:04 -05:00
Phil Bruckner ca9dd0c833
Reorganize trigger code (#38655) 2020-08-17 11:54:56 -05:00
Kit Klein 8d8c1335c5
Fix Konnected pro options (#38848) 2020-08-17 09:47:21 +02:00
Kit Klein a6236886e4
Set up konnected entities even if panel isn't immediately reachable (#38879) 2020-08-17 00:05:11 +02:00
Martin Hjelmare 0f1e70ca79
Fix ozw pure rgb dimmer light (#38877)
* Fix ozw pure rgb light

* Add test
2020-08-15 14:41:30 -04:00
escoand 9c6b019ca9
Better timeout handling in samsungtv integration (#38759)
* handle PlatformNotReady

* set timeout in bridge

* set timeout in test

* Revert "handle PlatformNotReady"

This reverts commit 118ee06ba0.
2020-08-15 20:25:37 +02:00
Franck Nijhof 755761867d
Use current request context in OAuth redirect (#38692) 2020-08-15 15:26:54 +02:00
J. Nick Koston 483d09b9c1
Adjust homekit controller pairing to have a new step for each potentially recoverable error (#38742)
* Adjust homekit controller pairing errors back to a single step

* adjust test

* Revert "Adjust homekit controller pairing errors back to a single step"

This reverts commit e5ed89bbbb.

* Revert "adjust test"

This reverts commit c2e9f21a8401c144315260f6fdf71ea8060f8ca3.

* adjust

* prune

* prune

* merge

* Update tests

* remove debug

* adjust

* Multiple steps

* adjust the test
2020-08-14 10:34:52 -05:00
Chris 5c9f29c43a
Fix ozw dimming transition (#38850)
* Handle float from light component

* Test with float

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-08-14 08:35:42 -04:00
J. Nick Koston 49478298cc
Ensure service browser does not collapse on bad dns names (#38851)
If a device on the network presented a bad name, zeroconf
would throw zeroconf.BadTypeInNameException and the service
browser would die off.  We now trap the exception and continue.
2020-08-13 22:00:39 -05:00
Niels Mündler fceba0bb88
Bump pysyncthru to 0.7.0 (#38832)
* Bump pysyncthru version to 0.7.0

This change includes a heavier refactoring, using a more reliable source for the device status and parsing display strings only for additional details

* Fix test flow to ensure a status is set
2020-08-13 20:48:26 -05:00
J. Nick Koston ee64aafc39
Fix iqvia test patching the wrong integration (#38847) 2020-08-13 11:47:18 -05:00
David F. Mulcahey ca5e752514
Add switch support to the Flo integration (#38268)
* Add switch domain to Flo integration

* lint

* updates post rebase

* fix after rebase

* remove device state attrs

* oops

* stale name and docstring
2020-08-13 07:52:30 -04:00
Marcio Granzotto Rodrigues 52a9921ed3
Nightscout PR fixes (#38737)
* Don't allow duplicate nightscout configs

* Fix nightscout translations

* Remove unnecessary should_poll method

* Remove SVG attribute, as it was duplicating the state

* Use aiohttp client session from HA

* Move validate_input outside the config class

* Use the entry unique_id on the sensor

* Move create entity logic

* Handle unexpected exception on Nightscout config
2020-08-13 07:46:07 -04:00
David F. Mulcahey 86aa758ecd
Add binary sensor support to the Flo integration (#38267)
* update device

* add binary sensor

* updates post rebase

* fix entity type post rebase

* fix post rebase

* fix add entities

* fix name

* review comments
2020-08-13 07:26:47 -04:00
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