Commit Graph

20571 Commits (1ac8442c63cce5222aee4cde287a63921f1d2791)

Author SHA1 Message Date
Erik Montnemery ddef681dd2
Improve MQTT debug info for subscriptions with wildcard (#33752) 2020-04-07 09:38:22 -07:00
Chris Talkington 1f7803c541
Catch IPPParseError during config flow (#33769)
* Update config_flow.py

* Update strings.json

* Update config_flow.py

* squash.
2020-04-07 09:32:43 -07:00
springstan 60eb488d0c
Bump pyW215 to 0.7.0 (#33786) 2020-04-07 09:22:03 -07:00
Franck Nijhof 2304a76979
Bumped version to 0.109.0dev0 (#33782) 2020-04-07 09:15:08 -07:00
Erik Montnemery 5cfae3f177
Add emontnemery as codeowner for cast, mqtt (#33784) 2020-04-07 09:13:02 -07:00
springstan 325e5416ef
Remove global variable from zigbee (#33750)
* Remove global variable from zigbee

* Pass device instead of hass into the constructor
2020-04-07 17:41:23 +02:00
J. Nick Koston 894aac1b45
Update nexia for thermostats without zoning (#33770)
* Bump nexia to 0.8.0
2020-04-07 10:33:43 -05:00
jan iversen b3286a4a01
Fix Modbus review comments (#33755)
* update common test for modbus integration

* remove log messages from modbus setup function.

* Make global method local

* Change parameter name to snake_case
2020-04-07 16:56:48 +02:00
Marcelo Moreira de Mello c19a1bf26d
Add Sense attribution to all Sense sensors (#33775) 2020-04-07 16:45:48 +02:00
Anton Verburg 93f7f78263
Support for pi4ioe5v9xxxx I2C IO expanders (#28847)
* Added support for the Pi4ioe5v9xxxx binary IO expanders.

* Correction for black failure

* Correction for black failure

* Fix for manifest.json

* Fix for flake8 fault missing a period

* Some modifications I made during tests seem to be disapeared, fixed flake8 and black test now

* WIP virtual thermostat

* WIP virtual thermostat

* WIP

* 100% tests coverage

* Manifest, codeowners, typo fix

* Lint problem

* Test file blacked

* Add a test case for b4dpxl's question

* Update CODEOWNERS

* Replacement of generic thermostat

* Cleaning

* Lint

* More lint

* Using external PyPI package, removed get()

* Fix flake8 checks

* removed virtual thermostat

* Re-fix black & isort

* Re-fix isort 2

* Update homeassistant/components/pi4ioe5v9xxxx/binary_sensor.py

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

* Update homeassistant/components/pi4ioe5v9xxxx/binary_sensor.py

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

* Update homeassistant/components/pi4ioe5v9xxxx/switch.py

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

* Update homeassistant/components/pi4ioe5v9xxxx/switch.py

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

* Update homeassistant/components/pi4ioe5v9xxxx/switch.py

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

* Update homeassistant/components/pi4ioe5v9xxxx/switch.py

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

* black for switch

* update to latest version manual merge

* Delete test_generic_thermostat.py

* Delete .gitignore

* Delete climate.py

* Delete manifest.json

* Delete test_climate.py

* Delete test_climate.py

* fix thermostat interference

* fix thermostat interference 2

* Fix pylint

* Update .pre-commit-config.yaml

Co-authored-by: Cyril <cyril.dubus@effipilot.com>
Co-authored-by: Niflou <dubuscyr@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-04-07 08:43:12 -05:00
HomeAssistant Azure 0ba04ec1ef [ci skip] Translation update 2020-04-07 00:07:21 +00:00
jjlawren b48dcca05d
Defer Plex sensor retry instead of aborting (#33753) 2020-04-06 16:18:13 -07:00
Aaron Bach 648b340e8c
Bump simplisafe-python to 9.0.6 (#33762) 2020-04-07 00:28:42 +02:00
Aaron Bach 98e7865457
Bump aioambient to 1.1.1 (#33761) 2020-04-06 15:14:27 -07:00
J. Nick Koston cf563df42a
Bump HAP-python to 2.8.1 (#33756) 2020-04-06 23:30:10 +02:00
Aaron Bach 6ca2c4da3a
Properly demarcate websocket and REST API callbacks in SimpliS… (#33706)
* Properly demarcate websocket and REST API callbacks in SimpliSafe

* Docstring

* Method names

* Cleanup

* Remove spurious logging

* Remove redundant method

* Fix comment

* Code review
2020-04-06 14:17:45 -07:00
Bram Kragten 2dbd8cf72c
Bump frontend (#33751) 2020-04-06 13:23:22 -07:00
Thibault Maekelbergh db2110f0c6
Add some safety checks for property access in NMBS sensor (#33695) 2020-04-06 21:15:29 +02:00
springstan 0d2de919a6
Clean up after global variable deletion (#33743)
* Clean up after global variable deletion

* Remove self from method calls
2020-04-06 10:32:04 -07:00
Erik Montnemery f3b6575272
Fix MQTT debug info for subscriptions with wildcard. (#33744) 2020-04-06 10:25:09 -07:00
J. Nick Koston 66ac5d5b76
Abort rachio config flow if the api key is already configured… (#33747)
We now abort before hitting the api which can be slow
and block startup if importing from yaml.
2020-04-06 10:24:08 -07:00
jjlawren c39fe36a1c
Skip parsing Plex session if incomplete (#33534)
* Skip parsing session if incomplete

* Schedule an update if session data is incomplete

* Mark as callback

* Remove update() & convert to async, abort if any session is incomplete
2020-04-06 10:15:11 -07:00
springstan c2a90a4f0d
Remove global variable from mochad (#33745) 2020-04-06 10:05:43 -07:00
jjlawren 6dfffb23c4
Fix Plex debounce wrapper (#33730)
* Fix debounce wrapper by converting to async

* Review suggestions
2020-04-06 09:57:51 -07:00
Ziv cedf7e3945
Fix unhandled exceptions for config, default_config, harmony (#33731)
* replaced MagicMock with CoroutineMock to avoid exception

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

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

* MQTT Alarm Control Panel to have all available states

* test_arm_custom_bypass_* tests added

* MQTT payload_arm_custom_bypass abbreviation
2020-04-06 11:45:37 +02:00
Aaron Bach f53dfc4308
Don't reinvent callback handler removal logic in several integ… (#33726) 2020-04-05 22:36:23 -07:00
HomeAssistant Azure f7b822d000 [ci skip] Translation update 2020-04-06 00:02:13 +00:00
Robert Svensson 529656cf64
UniFi - Improve client tracker attributes based on connection (#32817)
* Improve client tracker attributes by setting them to None when client is disconnected

* Fix martins comment
2020-04-06 01:26:11 +02:00
Quentame d99e228983
Add config flow to Synology DSM (#32704)
* Add config flow to Synology DSM

* Use proper sensor unique ID from flow + sensor name

* Add description to api_version

* Add authentication flow check

* Add device_info

* Add test_login_failed test

* Bump python-synology to 0.5.0

* 0.5.0 test updates

* Use NAS S/N as config_flow unique_id

* Add missed conf disks + volumes

* Review: async_unload the async_track_time_interval

* Fix NoneType for disks or volumes

* Keep all disks and volumes forever

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

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

* Update homeassistant/components/synology_dsm/strings.json

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

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

* Fix prettier

* Remove useless LOGGER in config flow

* Fix Synology DSM tests doing I/O

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-04-05 17:50:52 -05:00
J. Nick Koston e3e2e817e5
Convert rachio to cloudhooks (#33724)
* Convert rachio to cloudhooks

* add cloud to after_dependencies
2020-04-05 15:47:27 -07:00
springstan 2e6108365e
Remove global variable from sleepiq (#33715)
* Remove global variable from sleepiq

* Remove global variable from sleepiq v2

* Create constant file

* Move back time constant

* Update homeassistant/components/sleepiq/__init__.py

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

Co-authored-by: Quentame <polletquentin74@me.com>
2020-04-06 00:46:50 +02:00
J. Nick Koston 15f41c84f9
Fix rachio import of run time from yaml (#33723)
Importing from yaml would fail for rachio when
copying the manual run time to the option flow.
2020-04-05 15:25:31 -07:00
J. Nick Koston d28b477f9a
Fix nuheat response error checking (#33712)
This integration was checking request instead
of response for the error code.
2020-04-05 15:23:20 -07:00
springstan 60dd2213cf
Remove global variable from apcupsd (#33717)
* Remove global variable from apcupsd

* Run isort

* Address review comments
2020-04-05 23:54:37 +02:00
springstan 00e67fb2c7
Remove global variable from scsgate (#33719)
* Remove global variable from scsgate

* Import CONF_SCS_ID in light.py

* Run isort

* Remove constant ATTR_STATE
2020-04-05 23:47:11 +02:00
springstan 40ce8f8c9c
Remove global variable from arduino (#33718)
* Remove global variable from arduino

* Run isort
2020-04-05 23:27:58 +02:00
springstan 983ed8b8b4
Remove global variable from bloomsky (#33720) 2020-04-05 23:16:30 +02:00
springstan b1326928df
Remove global variable from aquostv (#33716) 2020-04-05 23:14:37 +02:00
J. Nick Koston 171c1b20f7
Remap homekit auto to home assistant heat_cool (#33701)
Home Assistant auto mode is described as
"The device is set to a schedule, learned behavior, AI."

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

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

* Fix file permissions

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

* Address review comments
2020-04-05 17:48:55 +02:00
Franck Nijhof 39336d3ea3
Add prettier (in pre-commit and CI) (#33693)
* Add prettier (in pre-commit and CI)

* Make all file prettier

* Change order

* Add to Azure Pipelines

* Fix a YAML file prettier caught as invalid

* Remove flow mapping using curly braces from all YAML service files
2020-04-05 17:27:16 +02:00
springstan e3bcfb88e7
Improve string formatting v4 (#33668)
* Improve string formatting v4

* Use normal strings instead of f-strings

* Fix zeroconf test by adding back part of a condition
2020-04-05 16:01:41 +02:00
J. Nick Koston b855177fe6
Make homekit aware of STATE_STANDBY (#33679) 2020-04-05 08:47:44 -05:00
J. Nick Koston de317fb2f6
Map dry and fan only states for homekit thermostats (#33682)
Homekit only has Off/Heat/Cool/Auto at this time, but
at least we can prevent the device from erroring
by mapping dry and fan to cool so it continues
to function.
2020-04-05 08:47:32 -05:00
Franck Nijhof 24840b54ac
Add yamllint (in pre-commit and CI) (#33676)
* Add yamllint (in pre-commit and CI)

* Fix linting for all YAML files

* Bump and add it to requirements

* Fix gen_requirements for pre-commit, remove 'v' from version
2020-04-05 10:33:45 +02:00
Franck Nijhof 7653dc947a
Enable pylint unnecessary-pass (#33650)
* Enable pylint unnecessary-pass

* Process review suggestions

* Fix smhi tests
2020-04-05 10:33:07 +02:00
J. Nick Koston 000ad256fb
Handle float values for homekit lightning (#33683)
* Handle float values for homekit lightning

* Empty commit to rerun CI
2020-04-04 23:21:44 -07:00
jjlawren d3a4270312
Plex logging additions & cleanup (#33681) 2020-04-04 23:21:20 -07:00
Michal Ziemski 8d3a415d07
Add OpenERZ API integration (#30441)
* Adding OpenERZ integration

* Added unit tests

* Linter fixes, better friendly_name handling

* Increase coverage

* Review fixes

* fixup! Review fixes

* Refactor to use external openerz-api library

* fixup! Refactor to use external openerz-api library

* fixup! Refactor to use external openerz-api library

* fixup! Refactor to use external openerz-api library

* fixup! Refactor to use external openerz-api library
2020-04-05 05:04:41 +02:00
Chris Talkington 927c2314c4
use async_on_remove for IPP Update Coordinator (#33596) 2020-04-04 21:42:51 -05:00
Franck Nijhof 61b4d1e8de
Small code style improvements to Insteon integration (#33662)
* Small code style improvements to Insteon integration

* Update homeassistant/components/insteon/utils.py

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-04-05 02:58:10 +02:00
HomeAssistant Azure d267d674b9 [ci skip] Translation update 2020-04-05 00:03:15 +00:00
springstan c20a965eda
Improve string formatting v3 (#33667)
* Improve string formatting v3

* Address review comment
2020-04-05 01:32:58 +02:00
Phil Bruckner bf1b408038
Handle cancellation in ServiceRegistry.async_call (#33644) 2020-04-04 15:36:33 -07:00
shred86 1c25468b21
Add await to coroutines in Abode (#33664) 2020-04-05 00:19:59 +02:00
Paulus Schoutsen 0a3ec6fea1
Correct Hue mireds for lights (#33597) 2020-04-04 14:29:03 -07:00
Franck Nijhof feed139ae7
Small code style improvements to Alexa integration (#33660) 2020-04-04 14:20:48 -07:00
springstan db72039b8f
Use list literals (#33659) 2020-04-04 23:14:47 +02:00
springstan dde93304d3
Improve string formatting v2 (#33645)
* Improve string formatting v2

* Improve string formatting v3

* Address review comments
2020-04-04 23:09:34 +02:00
Marcelo Moreira de Mello d2e70eb967
Add attribution to Sense component (#33657) 2020-04-04 22:51:00 +02:00
Franck Nijhof 22ae498f3a
Remove redundant open modes (#33652) 2020-04-04 22:49:15 +02:00
springstan fddaea797e
Use tuple literals (#33661) 2020-04-04 22:45:55 +02:00
springstan 0d95eff21d
Use dict literals (#33658) 2020-04-04 22:31:56 +02:00
springstan 541e30d155
Remove unused manifest fields v2 (#33656) 2020-04-04 22:11:33 +02:00
Franck Nijhof 6f1900c6f4
Replace OSError aliases with OSError (#33655) 2020-04-04 22:09:11 +02:00
Franck Nijhof 03cae17992
Use str literals (#33654) 2020-04-04 22:08:49 +02:00
Franck Nijhof 886308a953
String formatting improvements (#33653) 2020-04-04 21:39:22 +02:00
springstan ed71683488
Improve string formatting (#33643) 2020-04-04 20:17:11 +02:00
Franck Nijhof 71a47fc80c
Enable pylint global-statement (#33641) 2020-04-04 20:10:55 +02:00
Franck Nijhof 187b6525b4
Removal of extraneous parenthesis (#33637) 2020-04-04 20:08:55 +02:00
Franck Nijhof 7d3c974747
Use set & dict literals (#33636)
Co-authored-by: Daniel Høyer Iversen <mail@dahoiv.net>
2020-04-04 20:05:15 +02:00
Franck Nijhof d85222ad80
Use byte literals instead of encode (#33633) 2020-04-04 20:02:50 +02:00
Alexei Chetroi 39a01fcdc6
Update zha dependencies (#33639) 2020-04-04 12:58:43 -04:00
shred86 29d06e8faf
Update legacy job calls in abode (#33607) 2020-04-04 11:30:00 -05:00
Franck Nijhof e8a0abd107
String formatting improvements (#33635)
* String formatting improvements

* Found another one
2020-04-04 18:21:14 +02:00
J. Nick Koston 025cce3445
Handle race condition in harmony setup (#33611)
* Handle race condition in harmony setup

If the remote was discovered via ssdp before the yaml config import
happened, the unique id would already be set and the import
would abort.

* Update homeassistant/components/harmony/config_flow.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* reduce

* black

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-04-04 10:19:58 -05:00
Franck Nijhof b9b1cee403
Enable pylint import-outside-toplevel (#33631) 2020-04-04 17:07:36 +02:00
Franck Nijhof 9dfcae3dc2
Move imports to top for mystrom (#33629) 2020-04-04 16:09:49 +02:00
Franck Nijhof 29df8e546f
Move imports to top for spc (#33628) 2020-04-04 15:49:29 +02:00
Franck Nijhof f71125092f
Move imports to top for doorbird (#33627) 2020-04-04 15:49:20 +02:00
Franck Nijhof b112be3556
Move imports to top for danfoss_air (#33625) 2020-04-04 15:41:33 +02:00
Franck Nijhof 211ed3d596
Move imports to top in wirelesstag (#33624) 2020-04-04 15:35:27 +02:00
Franck Nijhof 46fa20411e
Bump twentemilieu to 0.3.0 (#33622)
* Bump twentemilieu to 0.3.0

* Fix tests
2020-04-04 14:51:12 +02:00
David F. Mulcahey debc1f78d4
Add zigbee information to ZHA device information (#33612)
* add zigbee signature to zha device info

* add typing

* use props and sort clusters

* review comment
2020-04-04 08:40:55 -04:00
Daniel Høyer Iversen 05192b7164
Support melcloud swing mode (#33008)
* melcloud, support for swing mode

* Update homeassistant/components/melcloud/climate.py

Co-Authored-By: Vilppu Vuorinen <vilppu.vuorinen@jubic.fi>

* Update homeassistant/components/melcloud/climate.py

Co-Authored-By: Vilppu Vuorinen <vilppu.vuorinen@jubic.fi>

* Update homeassistant/components/melcloud/climate.py

Co-Authored-By: Vilppu Vuorinen <vilppu.vuorinen@jubic.fi>

* Update homeassistant/components/melcloud/climate.py

Co-Authored-By: Vilppu Vuorinen <vilppu.vuorinen@jubic.fi>

Co-authored-by: Vilppu Vuorinen <vilppu.vuorinen@jubic.fi>
2020-04-04 14:07:36 +02:00
Vilppu Vuorinen 4a9f4f585d
Update pymelcloud to fix broken area device search (#33620)
Devices assigned to areas in MELCloud were not available through the
integration due to client lib bug.
2020-04-04 13:56:48 +02:00
Maciej Bieniek b60527c986
Change the method of getting the mac address in the braviatv i… (#33567)
* Remove getmac library

* Fix error handling

* Change error handling method
2020-04-03 22:44:28 -07:00
Anders Melchiorsen c628c2cef2
Identify more Sonos radio stations with poor titles (#33609) 2020-04-03 22:41:39 -07:00
Paulus Schoutsen c6ba607c8c
Use IP addresses instead of mDNS names when wled discovered (#33608) 2020-04-03 22:41:08 -07:00
Chris Talkington 07ae3f9ee9
Use IP addresses instead of mDNS names when IPP discovered (#33610)
* use discovery resolved host rather than mdns host.

* Update __init__.py

* Update test_config_flow.py

* Update __init__.py

* Update test_init.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update test_init.py

* Update test_config_flow.py
2020-04-03 22:36:46 -07:00
jjlawren 42353282d4
Debounce calls to Plex server (#33560)
* Debounce calls to Plex server

* Simplify debounce by recommendation

* Update tests to handle debounce

* Test debouncer, fix & optimize tests

* Use property instead
2020-04-03 22:34:42 -07:00
Paulus Schoutsen 1041dbe23c
Hass.io integration do not warn safe mode (#33600)
* Hass.io integration do not warn safe mode

* Better implementation

* Tweak log message
2020-04-03 19:42:06 -07:00
HomeAssistant Azure 8a8ee95336 [ci skip] Translation update 2020-04-04 00:07:23 +00:00
cgtobi 851c1711d4
Reduce log spam (#33592)
* Reduce log spam

* Reduce log spam

* Revert
2020-04-03 14:01:24 -07:00
Paulus Schoutsen f1d3c0d19b
Remove unused manifest fields (#33595) 2020-04-03 12:58:19 -07:00
cgtobi cd300f54a8
Add Home Coach to zeroconf detection (#33593) 2020-04-03 11:59:27 -07:00
Paulus Schoutsen dc7127aacf
Data Coordinator to return unsub func (#33588) 2020-04-03 20:15:42 +02:00
Aaron Bach d1663f2733
Perform some small Flu Near You cleanup (#33590) 2020-04-03 19:47:42 +02:00
Bram Kragten 6f7bd673fb
Updated frontend to 20200403.0 (#33586) 2020-04-03 10:32:00 -07:00
Erik Montnemery 3a74066529
Small cleanup in async_process_ha_core_config (#33583) 2020-04-03 09:44:20 -07:00
shred86 b8e9e3af2f
Add Abode entity available property (#32923)
* Add available property and raise exception

* Add entity available property

* Refactoring and fixes

* Refactoring and fix for multi sensor

* Bump abodepy version
2020-04-03 11:08:32 -05:00
Erik Montnemery 4e6fd19624
Improve MQTT test coverage and remove dead code (#33584)
* Improve MQTT tests and remove dead code

* Remove useless test.

* Add more test
2020-04-03 09:05:58 -07:00
Paul Beckcom a813847f6e
Automatic: fix OAuth2 redirect (#33581)
Integration configuration cannot complete as it is currently looking for /states after authentication.  Replacing with /lovelace to allow the script to complete after successful authentication with Automatic.
2020-04-03 08:45:33 -07:00
Vilppu Vuorinen 066254afdf
Fix vertical/horizontal property mixup in melcloud (#33580) 2020-04-03 17:45:09 +02:00
Andrey Kupreychik 912eb321d9
Add support for Mi AirPurifier 3 (#31729)
* Adding support for Mi AirPurifier 3

* Adding support for Mi AirPurifier 3H

* Enabled setting fan level for AirPurifier 3/3H

* Get rid of isinstance for MIOT AirPurifier

* Bumping xiaomi-miio dependency

* Fixed lint error

* Update manifest.json

* Fixed requirements files for 0.5.0.1

Co-authored-by: Piotr Król <Piotr@gorszyportal.pl>
2020-04-03 16:32:18 +02:00
Maciej Bieniek c0315e32bd
Fix source name (#33565) 2020-04-03 16:10:14 +02:00
Franck Nijhof dd37c3f447
Bump adguardhome to 0.4.2 (#33575) 2020-04-03 15:51:28 +02:00
Bram Kragten 54dd77fe88
Add default delay to Harmony config entries (#33576) 2020-04-03 15:39:22 +02:00
Fabian Affolter c8e0daee24
Upgrade cryptography to 2.9 (#33571) 2020-04-03 15:19:52 +02:00
FlavorFx b7dd8cdf50
Add unique id and show on map option in Tankerkoenig (#33400)
* Add unique id to set friendly name by UI

* Add ShowOnMap flag to show each/hide entity on map

* Update homeassistant/components/tankerkoenig/sensor.py

Co-Authored-By: guillempages <guillempages@users.noreply.github.com>

* Update homeassistant/components/tankerkoenig/sensor.py

Co-Authored-By: guillempages <guillempages@users.noreply.github.com>

* Update homeassistant/components/tankerkoenig/sensor.py

Co-Authored-By: guillempages <guillempages@users.noreply.github.com>

* Update homeassistant/components/tankerkoenig/sensor.py

Co-Authored-By: guillempages <guillempages@users.noreply.github.com>

* Update homeassistant/components/tankerkoenig/sensor.py

* Update homeassistant/components/tankerkoenig/__init__.py

* Update homeassistant/components/tankerkoenig

* Update homeassistant/components/tankerkoenig

* Update homeassistant/components/tankerkoenig/sensor.py

* Update homeassistant/components/tankerkoenig/sensor.py

Co-authored-by: guillempages <guillempages@users.noreply.github.com>
2020-04-03 08:14:42 -05:00
ollo69 62835f0536
Fix asuswrt network failure startup (#33485)
* Fix network failure startup

Fix for issue ##33284 - Asuswrt component fail at startup after power failure

* Removed comment

* Removed bare except

* is_connected moved out try-catch

* Removed pointless-string-statement

* Raise PlatformNotReady on "not is_connected"

* Removed unnecessary check

* Revert "Removed unnecessary check"

This reverts commit a2ccddab2c4b1ba441f1d7482d802d9774527a26.

* Implemented custom retry mechanism

* Fix new line missing

* Fix formatting

* Fix indent

* Reviewed check

* Recoded based on tibber implementation

* Formatting review

* Changes requested

* Fix tests for setup retry

* Updated missing test

* Fixed check on Tests

* Return false if not exception

* Format correction
2020-04-03 15:02:48 +02:00
Jc2k 730d90fb8c
Fix browsing regression (#33572) 2020-04-03 14:36:10 +02:00
Fabian Affolter eccab375a2
Upgrade Mastodon.py to 1.5.1 (#33243)
* Upgrade Mastodon.py to 1.5.1

* Remove left-overs
2020-04-03 12:06:28 +02:00
Maciej Bieniek b5c89b4ef4
Bump gios library to version 0.1.1 (#33569) 2020-04-03 11:58:37 +02:00
Fabian Affolter 2d751c1edd
Upgrade luftdaten to 0.6.4 (#33564) 2020-04-03 11:13:48 +02:00
Eugenio Panadero d1c1aa518d
Identify cameras in error logs for generic and mjpeg cameras (#33561) 2020-04-03 10:11:08 +02:00
Robert Van Gorkom ae22b5187a
Add vera config entries support (#29880)
* Adding vera config entries support.

* Fixing lint error.

* Applying minimal changes necessary to get config entries working.

* Addressing PR feedback by further reducing the scope of the change.

* Addressing PR feedback.

* Fixing pyvera import to make it easier to patch.
Addressing PR feedback regarding creation of controller and scheduling of async config flow actions.

* Updating code owners file.

* Small fixes.

* Adding a user config flow step.

* Adding optional configs for user config flow.

* Updating strings to be more clear to the user.

* Adding options flow.
Fixing some PR feedback.

* Better handling of options.
PR feedback changes.

* Using config registry to update config options.

* Better managing config from file or config from UI
Disabling config through UI if config is provided from a file.
More tests to account for these adjustments.

* Address PR feedback.

* Fixing test, merging with master.

* Disabling all Vera UI for configs managed by configuration.yml.
Adding more tests.

* Updating config based on unique_id.
Addressing additional PR feedback.

* Rebasing off dev.
Addressing feedback.

* Addressing PR feedback.
2020-04-03 09:49:50 +02:00
Paulus Schoutsen aef06a3544
Directly call write state 2 (#33513)
* Directly call async_write_ha_state pt2

* Directly call async_write_ha_state pt2

* Fix mock

* Address comments
2020-04-03 09:34:50 +02:00
akasma74 83cc871edf
Add force_update to timer integration (#31646)
* force_update added

As per this discussion we need to update last_changed when active timer restarted.
One way to do that is to force HA update the state on each request even if it remains the same.
More details here - https://github.com/home-assistant/architecture/issues/345

* add test for force_update

make sure state_change event fired every time timer (re)started

* remove whitespaces

* remove whitespace

* Update tests/components/timer/test_init.py

Co-Authored-By: Alexei Chetroi <lexoid@gmail.com>

* fix lint

* fix isort

Co-authored-by: Alexei Chetroi <lexoid@gmail.com>
2020-04-02 23:48:41 -07:00
J. Nick Koston d2cd557523
Add missing flow_title to doorbird (#33557)
When placeholders are in use, flow_title needs to be
set in the json to prevent an empty name in the
integrations dashboard. This affected doorbirds
that were found via ssdp.
2020-04-02 21:02:50 -07:00
jjlawren d98171ed05
Plex followup to #33542 (#33558) 2020-04-02 21:02:27 -07:00
Brian Rogers 2065039f65
Rachio Async fixes (#33549)
* Async fix

* Update homeassistant/components/rachio/switch.py

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

* Update homeassistant/components/rachio/switch.py

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

* Fix format

* Remove from hass

* undo dispatcher

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-04-02 20:55:17 -07:00
Raman Gupta 081b822d25
Add support for Vizio sound mode (#33200)
* add sound mode support for devices that support it

* make setting and unsetting flag better

* move eq and audio settings into constants

* fix missed statement to use constant instead of hardcoded string

* further fixes based on review

* bump pyvizio version to include newly identified app
2020-04-02 22:48:19 -04:00
J. Nick Koston f25321e010
Use homekit service callbacks for lights to resolve out of sync states (#32348)
* Switch homekit lights to use service callbacks

Service callbacks allow us to get the on/off, brightness, etc
all in one call so we remove all the complexity that was
previously needed to handle the out of sync states

We now get the on event and brightness event at the same time
which allows us to prevent lights from flashing up to 100%
before the requested brightness.

* Fix STATE_OFF -> STATE_ON,brightness:0
2020-04-02 20:06:13 -05:00
Chris Talkington 2b0bdd580c
Update to pyipp==0.8.3 (#33554)
* Update manifest.json

* Update requirements_all.txt

* Update requirements_test_all.txt
2020-04-02 17:09:38 -07:00
HomeAssistant Azure 08c9ceb752 [ci skip] Translation update 2020-04-03 00:04:03 +00:00
Teemu R e64104300f
Use backend-provided fan speed presets for Xiaomi vacuums, bum… (#32850)
* Use backend-provided fan speed presets for Xiaomi vacuums

This needs input from Xiaomi vacuum owners to verify that it does not break anything.
I have personally tested this on rockrobo v1 (old mapping).

Related issues/PRs:
home-assistant/core#32821
home-assistant/core#31268
home-assistant/core#27268

This is a WIP as it requires a new upstream release.
The PR is https://github.com/rytilahti/python-miio/pull/643

* Bump version requirement for 0.5.0

* Bump requirements_test_all.txt, too

* Fix linting; missing setup.cfg on local checkout caused wrong settings for black..

* Add tests for both fan speed types

* Remove useless else..

* bump python-miio to 0.5.0.1 due to broken 0.5.0 packaging
2020-04-02 16:55:44 -07:00
Aaron Bach cb058ff6c0
Add config entry for Flu Near You (#32858)
* Add config flow for Flu Near You

* Cleanup

* Cleanup

* Add tests

* Add test requirements

* Code review

* Reduce unnecessary async-ness

* Handle API registration

* Cleanup

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

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Code review

* Ensure config schema allows additional keys

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-04-02 16:54:11 -07:00
jjlawren 55870aec31
Temporary Plex play_media workaround (#33542)
* Temporary playMedia() workaround on plexapi 3.3.0

* Use constants for strings

* Style cleanup
2020-04-02 16:47:58 -07:00
Erik Montnemery 3df46cd70a
Remove MQTT state vacuum value_template support. (#33536)
* Fix MQTT state vacuum value_template support.

* Remove support for state_template
2020-04-02 16:46:18 -07:00
J. Nick Koston 9165ea5fbd
Revert "Add support to the Econet integration for new attributes: lower_temp, upper_temp, ambient_temp & is_enabled (#33363)" (#33555)
This reverts commit a30e217bb5.
2020-04-02 18:23:45 -05:00
Richard Powell a30e217bb5
Add support to the Econet integration for new attributes: lower_temp, upper_temp, ambient_temp & is_enabled (#33363) 2020-04-02 18:07:21 -05:00
Alistair Galbraith 3db9d6a6aa
Fix template light returning NULL in color or temperature (#33498)
* Support for returning NULL in color or temperature. Fixes #33469

* Added further support for ‘None’ returns in level template

* Removed assumption that template render may not be a string

* Streamlined code per cloud pylint

* Updates per code review suggestions

* Added improved error handling and logging for brightness

* Additional exception handling for temperature
2020-04-02 17:41:19 -05:00
J. Nick Koston 36a606f81d
Bump HAP-python to 2.8.0 (#33539) 2020-04-02 23:09:35 +02:00
Chris Talkington b719a77503 Bump pyipp to 0.8.2 (#33544) 2020-04-02 22:46:31 +02:00
Paulus Schoutsen 6afe6acb6c
Mark new gate device class as 2FA (#33541) 2020-04-02 22:02:59 +02:00
Vilppu Vuorinen 4b2c45e668
Add melcloud AtaDevice vane control (#32672)
* Add melcloud AtaDevice vane control

* Return empty dict when no vane states available

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Use constants for services and conf

* Split state attribute assignment and fix suggested changes

* Log valid positions when called with an invalid position

* Improve service description

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
2020-04-02 21:56:41 +02:00
Brian Rogers 4caf65dc97
Add Rachio Flex Schedules (#33533)
* Add Rachio Flex Schedules

* Remove Duration Property

* Missed duration call

* Black formatting
2020-04-02 13:43:40 -05:00
Ziv 39408ab240
Add cover platform to Dynalite (#32594)
* lib version

* unit-test refactoring

* added type hints

* added cover

* added test to see that consts have the same value as library consts

* Update tests/components/dynalite/test_init.py

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

* removed trigger template

* Update homeassistant/components/dynalite/__init__.py

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

* Update homeassistant/components/dynalite/const.py

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

* removed CONF_TRIGGER from const
corrected type hints - not clear why mypy didn't catch it

* conversion of the config to library CONFs

* moved to use the value since it should come from the library

* taking CONF_HOST from homeassistant.const instead of module const

* use dict.get
removed leftover log

* force device_class to be from homeassistant consts

* move dict.get to inline

* removed CONF from values
changed "channelcover" to "channel_cover"

* moved some CONF values out of const.py and taking them from homeassistant.const

* verifying that device class is a valid HA device class

* moved shutter to home assistant const

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-04-02 20:26:36 +02:00
mvn23 1d89d22a38
Update pyotgw to 0.6b1 (#33529) 2020-04-02 10:29:41 -07:00
David F. Mulcahey 8b0a0ee521
Don't write storage to disk while stopping (#33456)
* Don't write storage to disk while stopping

* rework change

* lint

* remove delay save and schedule final write at stop

* update tests

* fix test component using private methods

* cleanup

* always listen

* use stop in restore state again

* whitelist JSON exceptions for later

* review comment

* make zwave tests use mock storage
2020-04-02 10:25:28 -07:00
AJ Schmidt 9fd0192441
Remove extraneous parameter from AlarmDecoder services (#33516) 2020-04-02 10:22:54 -07:00
Chris Talkington 30fd9950e2
Add remote platform to directv (#32790)
* add remote platform to directv.

* Update __init__.py

* Update .coveragerc

* Rename remote py to remote.py

* Update remote.py

* squash.

* Update remote.py

* squash.

* Update remote.py
2020-04-02 10:18:53 -07:00
Paulus Schoutsen b10319f69e
Convert TTS tests to async (#33517)
* Convert TTS tests to async

* Address comments
2020-04-02 18:55:34 +02:00
Martin Hjelmare 1d2713b0ea
Clarify light reproduce state deprecation warning (#33531) 2020-04-02 09:52:46 -07:00
Erik Montnemery 457d439e24
Fix MQTT cleanup regression from #32184. (#33532) 2020-04-02 09:52:05 -07:00
J. Nick Koston 590e714021
Ensure harmony hub is ready before importing (#33537)
If the harmony hub was not ready for connection or
was busy when importing from yaml, the import validation
would fail would not be retried.

To mitigate this scenario we now do the validation in
async_setup_platform which allows us to raise
PlatformNotReady so we can retry later.
2020-04-02 09:46:10 -07:00
Paulus Schoutsen 4ebbabcdd1
Unsub dispatcher when removing entity from hass (#33510)
* Unsub dispatcher when removing entity from hass

* Update homeassistant/components/plaato/sensor.py

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

* Update homeassistant/components/volvooncall/__init__.py

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-04-02 09:25:33 -07:00
Robert Svensson 314bc07cee
UniFi - Make POE control switches configurable (#32781)
* Allow control whether POE switches are to be created or not

* Fix options flow and test
2020-04-02 17:53:33 +02:00
cgtobi 23e091696e
Fix netatmo device unavailable and services (#33509)
* Handle unavailabe entities

* Remove some logging

* Set valve to lowest temp when turned off

* Remove some logging

* Address comments

* Report entity as connected if update is successful

* Fix stupidness

* Fix
2020-04-02 17:35:25 +02:00
Jonathan Keljo f8f05c4d0d
Enable sisyphus to recover from bad DNS without restart (#32846) 2020-04-02 16:33:54 +02:00
Maciej Bieniek 5a55d50879
Bump brother to 0.1.11 (#33526) 2020-04-02 13:52:03 +02:00
mvn23 58ae117bb4
Add availability to opentherm_gw entities (#32408)
* Add availability to opentherm_gw entities

* Address PR comment
2020-04-02 11:28:39 +02:00
Chris Talkington be3cf52613
Update to roku==4.1.0 (#33520)
* Update manifest.json

* Update requirements_test_all.txt

* Update requirements_all.txt
2020-04-02 10:09:59 +02:00
HomeAssistant Azure 4a4496b21d [ci skip] Translation update 2020-04-02 00:04:41 +00:00
Paulus Schoutsen 7ae802bb0d
Cloud do checks during setup (#33507)
* Update cloud to do more tasks during async_setup

* Upgrade hass_nabucasa to 0.33
2020-04-01 15:25:04 -07:00
Paulus Schoutsen aaa1d06809
Directly call async_write_ha_state (#33508)
* Directly call async_write_ha_state

* Address comments

* Fix tests
2020-04-01 14:19:51 -07:00
Brian Rogers 775010f160
Add Rachio Schedules (#33421)
* Add Rachio Scheudles

* Add Rachio Schedules

* Revert "Add Rachio Schedules"

This reverts commit ffe1e3d1c2.

* Revert "Add Rachio Scheudles"

This reverts commit a015ec4a19.

* Add Rachio Schedules

* Update Logger

* Remove person

* Remove unneeded call

* Black

* Fix typo

* fix lint

* Replace old commits

* Revert "Replace old commits"

This reverts commit cc8a2a332a.

* Replace Schedules

* Fix Tests

* Missing unsubscribe

* Update homeassistant/components/rachio/switch.py

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-04-01 14:27:56 -05:00
Erik Montnemery fbd197146a
Add MQTT debug info for remaining MQTT integrations (#33506) 2020-04-01 11:48:32 -07:00
Paulus Schoutsen c63ec698a1 Update translations 2020-04-01 11:43:30 -07:00
Eugenio Panadero 71aaf2d809
Add device triggers for Hue remotes (#33476)
* Store device_registry entry id in HueEvent

so it can be retrieved with that key when using device triggers

* Add device_trigger for hue_event from hue remotes

* supporting Hue dimmer switch & Hue Tap
* State mapping and strings are copied from deCONZ

* refactor mock_bridge for hue tests

and also share `setup_bridge_for_sensors`
for test_sensor_base and test_device_trigger.

* Add tests for device triggers with hue remotes

* Remove some triggers
2020-04-01 11:42:22 -07:00
Bram Kragten 400602a8b3
Updated frontend to 20200401.0 (#33505) 2020-04-01 11:27:01 -07:00
J. Nick Koston 4a32a0f1da
Expand network util to check for link local addresses (#33499) 2020-04-01 11:24:30 -07:00
springstan 0cf9268ca8
Fix invalid directory for dnsmasq files in asuswrt (#33503) 2020-04-01 11:04:44 -07:00
Erik Montnemery fb93b79b12
Add MQTT debug info (#33461)
* Add MQTT debug info

* Tweaks

* Tweaks
2020-04-01 10:00:40 -07:00
Alexei Chetroi eff9b2a1a0
Clean up ZHA channel reporting configuration (#33497) 2020-04-01 11:35:48 -04:00
Ziv 4dbbf93af9
Replace asyncio.wait with asyncio.gather since wait ignores exceptions (#33380)
* replace asyncio.wait with asyncio.gather since wait ignores exceptions
fix for test_entity_platform so it expects the exception

* changed to log on failed domains

* discovered that this fix actually removes other uncaught exceptions

* fix in the list of ignored exceptions

* replaced a few ignores on dyson tests that work locally but fail in the CI

* two more tests that are failing on the CI and not locally

* removed assertion on multiple entries with same unique_id - replaced with log and return
reverted test_entity_platform to its original since now there is no exception thrown

* entered all the dyson tests. they all pass locally and probabilistically fail in the CI

* removed unnecessary str() for exception

* added log message for duplicate entity_id / unique_id

* removed log in case of False return value

* added exc_info

* change the use of exc_info
2020-04-01 07:09:13 -07:00
David F. Mulcahey 3d73f166be
Correct issue on new device joins in ZHA (#33470) 2020-04-01 14:41:16 +02:00
Alexei Chetroi 0e6aacb440
Bump up zha dependencies. (#33488) 2020-03-31 23:33:05 -04:00
J. Nick Koston cc443ff37a
Add config flow for nut (#33457)
* Convert nut to config flow

* Add a test for importing

* lint

* Address review items (part 1)

* Address review items (part 1)

* Cleanup unique id handling

* Update tests for new naming scheme

* No unique id, no device_info

* Remove sensor types

* Update tests to use resources that still exist
2020-03-31 19:08:27 -07:00
HomeAssistant Azure 2cfa0af532 [ci skip] Translation update 2020-04-01 00:05:04 +00:00
Kit Klein 955c94e313
allow overriding host api url in config flow (#33481)
* allow overriding host api url in config flow

* fix typo

* capitalize URL
2020-03-31 15:50:37 -07:00
Chris Talkington b892dbc6ea
Refactor DirecTV Integration to Async (#33114)
* switch to directv==0.1.1

* work on directv async.

* Update const.py

* Update __init__.py

* Update media_player.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update media_player.py

* Update test_config_flow.py

* Update media_player.py

* Update media_player.py

* work on tests and coverage.

* Update __init__.py

* Update __init__.py

* squash.
2020-03-31 15:35:32 -07:00
J. Nick Koston 3566803d2e
Fix setting zone overlays for tados that support swing (#33439)
* Fix setting zone overlays for tados that support swing

* Support for changing swing mode will come at a later
time as another upstream update is required.

* remove debug

* style
2020-03-31 17:29:45 -05:00
Ron Klinkien 774b1d1663
Enable KNX tunnel auto_reconnect by default (#33387)
* Added tunnel reconnect functionality

* Code improvements

* Update homeassistant/components/knx/__init__.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Enable auto_reconnect for tunnels by default

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
2020-04-01 00:22:20 +02:00
J. Nick Koston 90dd796644
Prepare rachio for cloudhooks conversion (#33422)
Reorganize code in order to prepare for webhooks
2020-03-31 14:46:30 -07:00
J. Nick Koston a473ae6711
Ignore link local addresses during doorbird ssdp config flow (#33401) 2020-03-31 14:20:29 -07:00
Chris Caron be99f3bf32
Bumped Apprise version to v0.8.5 (#33473) 2020-03-31 22:30:27 +02:00
Raman Gupta 5047635224
update VIZIO name to match brand guidelines (#33465) 2020-03-31 22:28:08 +02:00
J. Nick Koston e6ed2f0377
Add version and device type to powerwall device_info (#33453)
* Add version and device type to powerwall device_info

* Upstream powerwall now supports a http_session
2020-03-31 12:55:50 -07:00
Paulus Schoutsen 06216a8a45
Google Assistant: parallize as many requests as possible (#33472)
* Google Assistant: parallize as many requests as possible

* Fix double comment
2020-03-31 12:01:31 -07:00
J. Nick Koston f085a0c54a
Retry sense setup later if listing devices times out. (#33455) 2020-03-31 11:59:03 -07:00
J. Nick Koston b783aab41b
Add binary sensor for myq gateway connectivity (#33423) 2020-03-31 11:58:44 -07:00
J. Nick Koston 12b408219e
Improve handling of nuheat switching states (#33410)
* The api reports success before the state change
takes effect

* We now set state optimistically and followup with
an update 4 seconds in the future after any state change to
verify it actually happens.

* When hvac_mode is passed to the set_temperature service
we now switch to the desired mode.
2020-03-31 11:55:13 -07:00
J. Nick Koston 6cafc9aaef
Add humidity support to homekit thermostats (#33367) 2020-03-31 11:45:33 -07:00
Eugenio Panadero f5cbc9d208
Fire events for hue remote buttons pressed (#33277)
* Add remote platform to hue integration

supporting ZGPSwitch, ZLLSwitch and ZLLRotary switches.

* Ported from custom component Hue-remotes-HASS from @robmarkcole

* Add options flow for hue, to toggle handling of sensors and remotes

* Sensors are enabled by default, and remotes are disabled,
  to not generate any breaking change for existent users.
  Also, when linking a new bridge these defaults are used,
  so unless going explicitly to the Options menu,
  the old behavior is preserved.
* SensorManager stores the enabled platforms and ignores everything else.
* Bridge is created with flags for `add_sensors` and `add_remotes`,
  and uses them to forward entry setup to only the enabled platforms.
* Update listener removes disabled kinds of devices when options are changed,
  so device list is in sync with options, and disabled kinds disappear from HA,
  leaving the enable/disable entity option for individual devices.

* Fix hue bridge mock with new parameters

* Revert changes in hue bridge mock

* Remove OptionsFlow and platform flags

* Extract `GenericHueDevice` from `GenericHueSensor`

to use it as base class for all hue devices, including those without any entity,
like remotes without battery.

* Add `HueBattery` sensor for battery powered remotes

and generate entities for TYPE_ZLL_ROTARY and TYPE_ZLL_SWITCH remotes.

* Remove remote platform

* Add HueEvent class to fire events for button presses

* Use `sensor.lastupdated` string to control state changes
* Event data includes:
  - "id", as pretty name of the remote
  - "unique_id" of the remote device
  - "event", with the raw code of the pressed button
    ('buttonevent' or 'rotaryevent' property)
  - "last_updated", with the bridge timestamp for the button press
* Register ZGP_SWITCH, ZLL_SWITCH, ZLL_ROTARY remotes

* fix removal

* Exclude W0611

* Extract GenericHueDevice to its own module

and solve import tree, also fixing lint in CI

* Store registered events to do not repeat device reg

* Minor cleaning

* Add tests for hue_event and battery entities for hue remotes
2020-03-31 10:27:30 -07:00
Jeff McGehee dd1608db0d
Best effort state initialization of bayesian binary sensor (#30962)
* Best effort state initialization of bayesian binary sensor.

Why:

* https://github.com/home-assistant/home-assistant/issues/30119

This change addresses the need by:

* Running the main update logic eagerly for each entity being observed
  on `async_added_to_hass`.
* Test of the new behavior.

* Refactor in order to reduce number of methods with side effects that
mutate instance attributes.

* Improve test coverage

Why:

* Because for some reason my commits decreased test coverage.

This change addresses the need by:

* Adding coverage for the case where a device returns `STATE_UNKNOWN`
* Adding coverage for configurations with templates

* rebase and ensure upstream tests passed

* Delete commented code from addressing merge conflict.
2020-03-31 10:41:29 -06:00
Eugenio Panadero f2f03cf552
Fix deconz tests that have uncaught exceptions (#33462) 2020-03-31 11:19:34 -05:00
Bram Kragten ffefdcfe22
Require admin to manage lovelace (#33435) 2020-03-31 11:43:21 +02:00
Aaron Bach 23668f3c5e
Overhaul the Slack integration (async and Block Kit support) (#33287)
* Overhaul the Slack integration

* Docstring

* Empty commit to re-trigger build

* Remove remote file option

* Remove unused function

* Adjust log message

* Update homeassistant/components/slack/notify.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Code review

* Add deprecation warning

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-03-30 21:32:29 -06:00
Marcel Steinbach 6208d8c911
Add HomeKit support for slat tilting (#33388)
* Add HomeKit support for slat tilting

* Reset tilt-specific attribute, not position attribute

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

* Add explanation why we fix HomeKit's targets

We have to assume that the device has worse precision than HomeKit. If it
reports back a state that is only _close_ to HK's requested state, we'll
"fix" what HomeKit requested so that it won't appear out of sync.

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-03-30 19:47:03 -05:00
David F. Mulcahey d0dad4bfd6
Fix uncaught exceptions in ZHA tests (#33442) 2020-03-30 20:34:23 -04:00
Balazs Sandor 7330e30fd3
bump version zigpy-cc (#33448) 2020-03-30 20:33:07 -04:00
Franck Nijhof a9cbd355ca
Correct FortiOS integration name in manifest (#33454) 2020-03-30 17:20:37 -07:00
HomeAssistant Azure 3e0eaa3c87 [ci skip] Translation update 2020-03-31 00:02:51 +00:00
Chris Talkington 98f68f4798
Add Internet Printing Protocol (IPP) integration (#32859)
* Create __init__.py

* Create manifest.json

* Update zeroconf.py

* more work on integration

* more work on integration.

* add more sensor tests.

* Update const.py

* Update sensor.py

* more work on ipp.

* Update test_config_flow.py

* more work on ipp.

* Update config_flow.py

* Update config_flow.py
2020-03-30 16:13:47 -07:00
evoblicec 0e3c1dc031
Add new mapped weather condition classes to Météo France (#33450)
* Update Meteo_France Weather constants

Updating Meteo_France integration with more weather "condition" returned by the web service.

Adding: 
- "Nuit claire" (note the lower 'c') mapped to "clear-night"
- "Brume" mapped to "fog"

* Black formatting update
2020-03-31 00:05:18 +02:00
Erik Montnemery 9508c51403
Fix change of entity_id for discovered MQTT entities (#33444) 2020-03-30 14:26:59 -07:00
Bram Kragten 531207e005
Updated frontend to 20200330.0 (#33449) 2020-03-30 14:20:14 -07:00
Bram Kragten 952aa02e37
Add ability to specify group when creating user (#33373)
* Add abbility to specify group when creating user

* Fix tests

* Not default admin and tests
2020-03-30 20:33:43 +02:00
Bas Nijholt 3e0ccd2e86
Add KEF services for DSP (#31967)
* add services for DSP

* add homeassistant/components/kef/const.py

* add services.yaml

* fix set_mode

* fix services

* media_player.py fixes

* bump aiokef to 0.2.9

* update requirements_all.txt

* add basic sensor.py

* add DSP settings as attributes

* add message about kef.update_dsp

* remove sensor.py

* fix pylint issues

* update_dsp inside async_added_to_hass

* use {...} instead of dict(...)

* get DSP settings when connecting to HA or once on update

* simplify condition

* do not get mode twice

* remove async_added_to_hass

* use async_register_entity_service

* remove entity_id from schema and prepend _value

* invalidate self._dsp after setting a DSP setting

* schedule update_dsp every hour

* subscribe and unsubscribe on adding and removing to HA

* don't pass hass and set _update_dsp_task_remover to None after removing
2020-03-30 10:45:24 -07:00
David F. Mulcahey bcd1eb952c
RFC - Add a 3rd state to the HA shutdown sequence for writing… (#33358)
* add third stage to hass shutdown

* use 3rd stage in storage

* update core state

* add writing data to multi stop ignore

* update core test

* review comment

* update name based on feedback
2020-03-30 10:18:39 -07:00
da-anda 01bf4daf37
Fix detection of zone master in soundtouch media_player (#33157) 2020-03-30 17:27:02 +02:00
Santobert 0186ce7896
Filter the history of device_tracker by location attributes (#33356)
* Add include_location_attributes

* Add check for different state

* Fix things

* Drop filter

* significant changes only

* Change default behavior

* Remove trailing commas
2020-03-30 08:13:22 -07:00
J. Nick Koston f42804805c
Move Tado zone state handling into upstream python-tado library (#33195)
* Tado climate state moved to python-tado

* Resolve various incorrect states and add tests for known tado zone states

* Write state instead of calling for an update

This is a redux of pr #32564 with all of the zone state now moved into
python-tado and tests added for the various states.

* stale string

* add missing undos to dispachers

* remove unneeded hass

* naming

* rearrange

* fix water heater, add test

* fix water heater, add test

* switch hvac mode when changing temp if in auto/off/smart
2020-03-30 09:06:26 -05:00
vwir eee0a6e9f4
Fix for nissan_leaf component getting stuck (#33425)
* Fix for nissan_leaf component getting stuck

* Remove dots from error messages in nissan_leaf component
2020-03-30 09:35:50 +02:00
Kit Klein 0e6b905cdf
Add konnected multi output (#33412)
* add test to for importing multiple output settings

* provide option to set multiple output states

* tweaks after testing

* Update homeassistant/components/konnected/config_flow.py

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-03-29 20:05:59 -07:00
J. Nick Koston d59209ff47
Prevent nut from doing I/O in the event loop (#33420)
* Prevent nut from doing I/O in the event loop

device_state_attributes would call for an update if the
throttle happened to expire.

* _format_display_state no self use
2020-03-29 20:53:25 -05:00
jan iversen ad8cf2d0d0
Remove Modbus legacy code (#33407)
* Modbus: remove legacy code

flexit and stiebel_el are updated to import modbus.const,
therefore legacy code can be removed.

* Flexit: update const reference from modbus

climate.py imports from modbus direct, this is legacy and will
result in errors.

update import to be modbus.const.

* Stiebel_el: update reference to modbus

__init.py references modbus directly, this is legacy and will
give errors.

Update import to be modbus.const.
2020-03-30 01:35:58 +02:00
Aaron Bach fe0db80fb8
Bump aioambient to 1.1.0 (#33414) 2020-03-30 00:28:37 +02:00
David F. Mulcahey ef61118d49
fix ZHA IASWD commands (#33402) 2020-03-29 17:42:37 -04:00
Malte Franken de54659097
Fix GeoNet NZ Quakes tests (#33383)
* enable tests

* only remove entity if exists
2020-03-29 22:40:09 +02:00
Jc2k ad3c5240c2
Bump aiohomekit version to fix Ecobee Switch (#33396) 2020-03-29 22:38:52 +02:00
Anders Liljekvist 0f9790f5f1
Bluesound volume stepper bugfix (#33404) 2020-03-29 22:38:03 +02:00
jjlawren 68e86c5e3a
Handle Ecobee service timeouts (#33381)
* Bump pyecobee to 0.2.4

* Bump pyecobee to 0.2.5
2020-03-29 22:15:12 +02:00
SukramJ 1cd0e764b6
Use new HMIP labels for HomematicIP Cloud multi devices (#32925)
* Use new labels for HomematicIP Cloud multi devices

* Update homeassistant/components/homematicip_cloud/device.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Update name composition

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
2020-03-29 21:38:59 +02:00
cgtobi d45c386149
Bump opencv to 4.2.0.32 (#33391)
* Bump opencv to 4.2.0.32
2020-03-29 21:30:00 +02:00
jan iversen dd3cd95954
Modbus patch, to allow communication with "slow" equipment using tcp (#32557)
* modbus: bumb pymodbus version to 2.3.0

pymodbus version 1.5.2 did not support asyncio, and in general
the async handling have been improved a lot in version 2.3.0.

updated core/requirement*txt

* updated core/CODEOWNERS

committing result of 'python3 -m script.hassfest'.

* modbus: change core connection to async

change setup() --> async_setup and update() --> async_update()

Use async_setup_platform() to complete the async connection to core.

listen for EVENT_HOMEASSISTANT_START happens in async_setup()
so it needs to be async_listen.

But listen for EVENT_HOMEASSISTANT_STOP happens in start_modbus()
which is a sync. function so it continues to be listen().

* modbus: move setup of pymodbus into modbushub

setup of pymodbus is logically connected to the class modbushub,
therefore move it into the class.

Delay construction of pymodbus client until event
EVENT_HOMEASSISTANT_START arrives.

* modbus: use pymodbus async library

convert pymodbus calls to refer to the async library.

Remark: connect() is no longer needed, it is done when constructing
the client. There are also automatic reconnect.

* modbus: use async update for read/write

Use async functions for read/write from pymodbus.

change thread.Lock() to asyncio.Lock()

* Modbus: patch for slow tcp equipment

When connecting, via Modbus-TCP, so some equipment (like the
huawei sun2000 inverter), they need time to prepare the protocol.

Solution is to add a asyncio.sleep(x) after the connect() and before
sending the first message.

Add optional parameter "delay" to Modbus configuration.
Default is 0, which means do not execute asyncio.sleep().

* Modbus: silence pylint false positive

pylint does not accept that a class construction __new__
can return a tuple.

* Modbus: move constants to const.py

Create const.py with constants only used in
the modbus integration.

Duplicate entries are removed, but NOT any entry that would
lead to a configuration change.

Some entries were the same but with different names, in this
case renaming is done.

Also correct the tests.

* Modbus: move connection error handling to ModbusHub

Connection error handling depends on the hub, not the
entity, therefore it is logical to have the handling in
ModbusHub.

All pymodbus call are added to 2 generic functions (read/write)
in order not to duplicate the error handling code.

Added property "available" to signal if the hub is connected.

* Modbus: CI cleanup

Solve CI problems.

* Modbus: remove close of client

close() no longer exist in the pymodbus library, use
del client instead.

* Modbus: correct review comments

Adjust code based on review comments.

* Modbus: remove twister dependency

Pymodbus in asyncio mode do not use twister but still throws a
warning if twister is not installed, this warning goes into
homeassistant.log and can thus cause confusion among users.

However installing twister just to avoid the warning is not
the best solution, therefore removing dependency on twister.

* Modbus: review, remove comments.

remove commented out code.
2020-03-29 12:39:30 -05:00
David F. Mulcahey 188ca630de
Miscellaneous ZHA code cleanup (#33395)
* cleanup state change listener

* update group id handling and unique id

* update test

* add guards for last_seen updates
2020-03-29 13:26:48 -04:00
jjlawren ffafcf27a8
plexwebsocket bump 0.0.7 to fix ignored tests (#33398)
* Bump plexwebsocket to 0.0.7

* Remove unnecessary test ignores
2020-03-29 12:14:42 -04:00
tiagofreire-pt 21098bc3e5
Upgrade broadlink to 0.13.0 (#33240)
* Upgrading the broadlink library version to 0.13.0

As stated here: https://pypi.org/project/broadlink/

* Update requirements_test_all.txt

* Update requirements_all.txt

* Delete requirements_test_all.txt

* Revert "Delete requirements_test_all.txt"

This reverts commit 008f6f2030.

* Revert "Revert "Delete requirements_test_all.txt""

This reverts commit 73e22fd0ff.

* Revert "Revert "Revert "Delete requirements_test_all.txt"""

This reverts commit 7662119c89.
2020-03-29 13:03:46 +02:00
bangom 1f9f5bfaa8
Fix wrong SI unit_prefix in Integration component (#33227) (#33228)
* wrong SI metric prefixes
2020-03-29 11:17:53 +01:00
jjlawren 312af53935
Handle Plex certificate updates (#33230)
* Handle Plex certificate updates

* Use exception in place

* Add test
2020-03-28 21:02:29 -07:00
SukramJ 3c2df7f8f2
Fix homematicip_cloud tests that have uncaught exceptions (#33371) 2020-03-28 21:01:53 -07:00
Colin Harrington 42cb5a5239
Calculate Plum Lightpad brightness and glowIntensity correctly (#33352)
* Plum Lightpad - glowIntensity is represented as a float/percentage
Calculate brightness from the glowIntensity instead of the glowIntensity from brightness.

* Renamed `_glowIntensity` to `_glow_intensity`

* Added Rounding, converting to an int, min and max boxing

* Added codeowners to the Plum Lightpad manifest.json
2020-03-28 21:01:22 -07:00
Austin Mroczek d832ce0b26
Fix openweathermap sensor.py so no KeyError if raining is miss… (#33372) 2020-03-28 20:59:57 -07:00
Richard de Boer f32ae95ef4
Fix media_player supported features default value (#33366)
I looked at all media_player components and these were the only ones returning None:
- bluesound
- emby
- mpd
2020-03-28 20:59:04 -07:00
Maciej Bieniek de2f506585
Migrate GIOS to use DataUpdateCoordinator (#33306)
* Migrate to DataUpdateCoordinator

* Simplify code
2020-03-28 20:57:06 -07:00
David F. Mulcahey f7ae78f78e
Update ZHA group entity when Zigbee group membership changes (#33378)
* cleanup group entities

* add test

* appease pylint

* fix order
2020-03-28 20:38:48 -04:00
HomeAssistant Azure 5bedc4ede2 [ci skip] Translation update 2020-03-29 00:04:45 +00:00
Anders Melchiorsen 03a090e384
Fixes for Sonos media position (#33379) 2020-03-28 16:15:32 -07:00
Ziv dd232a3507
Fix uncaught exceptions in dynalite (#33374) 2020-03-28 22:19:43 +01:00
Colin Harrington 03a9e3284c
Fix broken supported_features in Plum Lightpad (#33319) 2020-03-28 21:21:28 +01:00
Malte Franken c08ca8a439
Fix GDACS tests (#33357)
* enable tests

* only remove entity if exists
2020-03-28 21:18:15 +01:00
J. Nick Koston 5a1b0edd96
Add inline comments to elkm1 about how config is updated from… (#33361) 2020-03-28 17:23:39 +01:00
Bram Kragten 1477087c71
Fix Lovelace resources health info (#33309)
* Fix Lovelace resources health info

* Fix tests
2020-03-28 13:57:36 +01:00
Hans Oischinger 4a2236fe85
:vicare: Improve scan_interval (#33294)
This upgrades to PyVicare 0.1.10 which allows to combine multiple
requests into a single HTTP GET. This in turn allows us to increase
the scan_interval to 60 seconds by default.
Additionally scan_interval has been introduced as a config parameter.
2020-03-28 12:12:27 +01:00
J. Nick Koston 95cefd1acc
Fix nuheat unexpectedly switching to a permanent hold (#33316)
When in run schedule mode, setting the temperature will switch
the device to a temporary hold.  If you set the temperature
again, we should stay in temporary hold mode and not switch
to permanent hold.

The underlying nuheat package contains a default to a
permanent hold if no setting was passed.  We now always
pass the setting.
2020-03-27 23:01:59 -07:00
David F. Mulcahey 5ce31cb383
Fix ZHA light group on state (#33308) 2020-03-27 23:01:17 -07:00
ochlocracy 28a2c9c653
Implement Alexa.CameraStreamController in Alexa (#32772)
* Implement Alexa.CameraStreamController.

* Add dependencies.

* Add camera helpers for image url, and mjpeg url.

* Remove unsupported AlexaPowerController from cameras.

* Refactor camera_stream_url to hass_url

* Declare HLS instead of RTSP.

* Add test for async_get_image_url() and async_get_mpeg_stream_url().

* Sort imports.

* Fix camera.options to camera.stream_options. (#32767)


(cherry picked from commit 9af95e8577)

* Remove URL configuration option for AlexaCameraStreamController.

* Update test_initialize_camera_stream.

* Optimize camera stream configuration.

* Update Tests for optimized camera stream configuration.

* Sort imports.

* Add check for Stream integration.

* Checks and Balances.

* Remove unnecessary camera helpers.

* Return None instead of empty list for camera_stream_configurations().
2020-03-27 21:19:11 -07:00
J. Nick Koston 369ffe2288
Fix setting HomeKit temperatures with imperial units (#33315)
In PR#24804 the step size was changed to match the step size
of the device that HomeKit is controlling. Since HomeKit
is always working in TEMP_CELSIUS and the step size is based on
the Home Assistant units setting, we were mixing data with different
units of measure when Home Assistant was using imperial units.

This regression presented the symptom that setting the
temperature to 73F would result in 74F.  Other values are affected
where the math doesn't happen to work out.

HomeKit currently has a default of 0.1 in the spec and the override
of this value has been removed.
2020-03-27 21:02:51 -07:00
HomeAssistant Azure 5f72ad8da6 [ci skip] Translation update 2020-03-28 00:08:09 +00:00
J. Nick Koston 00c38c5f70
Bump nexia to 0.7.3 (#33311)
* Resolves not being able to see the compressor speed.
2020-03-27 15:40:54 -05:00
J. Nick Koston 18a4829314
Config flow for elkm1 (#33297)
* Config flow for elkm1

* As entity ids can now be changed, the “alarm_control_panel”
attribute “changed_by_entity_id” is now “changed_by_keypad”
and will show the name of the Elk keypad instead of the entity id.

* An auto configure mode has been introduced which avoids the
need to setup the complex include and exclude filters.  This
functionality still exists when configuring from yaml for power
users who want more control over which entities elkm1 generates.

* restore _has_all_unique_prefixes

* preserve legacy behavior of creating alarm_control_panels that have no linked keypads when auto_configure is False

* unroll loop
2020-03-27 15:38:35 -05:00
Adam Michaleski c629e7dc0e
Add integration for Schluter (#31088)
* Add integration for Schluter
New integration for Schluter DITRA-HEAT thermostats. Interacts with Schluter API via py-schluter to implement climate platform.

* Fix for manifest issue on build
Removed unnecessary configurator logic

* Flake8 & ISort issues fixed

* Code review modifications for Schluter integration
- Removed unnecessary strings.json file
- Removed unnecessary DEFAULT_SCAN_INTERVAL from __init__.py
- Removed persistent notification for authentication error in __init__.py
- Removed string casts from log statements in __init__.py
- Removed unnecessary logging of entity creations in climate.py
- Removed unnecessary lookup for hvac_mode in climate.py

* Work started on Update Coordinator

* Further Coordinator work

* Update to DataUpdateCoordinator complete

* Flake8 fix

* Removal of unnecessary SchluterPlatformData
Coordinator also now using SCAN_INTERVAL

* Disable polling, use coordinator listeners

* Isort on climate.py

* Code review modifications
- Hass data stored under domain
- Since platform only likely to be climate, removed array, load explicitly
- Remove unnecessary fan mode implementation

* Switch to HVAC action for showing current heating status

* Isort fix

* HVAC Mode return list, set_hvac_mode function added

* __init__.py modifications from code review

* Climate.py code review modifications
- Device info property removed
- Write state function on set temp failure
- Add "available" property
- Delegate sync function in coordinator update to the executor

* Serial number as unique identifier
- Now using serial number & thermostat dictionary to protect against scenarios where a device is removed and enumerable index is no longer accurate
- Removed async_write_ha_state() from set temp exception, not needed
- Removed unnecessary SCAN_INTERVAL definition

* Linting

* Update homeassistant/components/schluter/climate.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Update homeassistant/components/schluter/climate.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Changed timeout from config, load platform discover to None

* Proposed change for discover info issue

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-03-27 10:53:36 -07:00