Compare commits

...

857 Commits

Author SHA1 Message Date
Franck Nijhof
e0367dc721 Bumped version to 0.112.0b0 2020-06-24 21:35:02 +02:00
Markus Bong
35dc5ba742 Add devolo sensor devices (#37049) 2020-06-24 10:06:11 -07:00
rajlaud
f7325a7d35 Squeezebox dispatch helper (#37030) 2020-06-24 10:04:17 -07:00
J. Nick Koston
a798b508bc Raise slow startup timeout to 3h for large db migrations. (#37061) 2020-06-24 09:58:01 -07:00
J. Nick Koston
255d706c24 Avoid creating a column in v8 schema that is removed in v9 schema (#37062) 2020-06-24 09:56:01 -07:00
J. Nick Koston
cc8e0ef942 Handle mysql index/column already exists during migration (#37064) 2020-06-24 09:55:13 -07:00
RogerSelwyn
d9a3b04e30 Fix asuswrt spamming logs with exceptions (#37063) 2020-06-24 18:50:58 +02:00
Andre Lengwenus
4a65bed0eb Fix LCN cover behavior when using output ports (#37034)
* Fixed LCN cover behavior when connected to output ports

* Cover is assumed to be in an open state unless it is fully closed.
2020-06-24 15:10:56 +02:00
Franck Nijhof
02adcc532f Fix rest to use BinarySensorEntity (#37054) 2020-06-24 14:53:17 +02:00
bsmappee
fbd5ccf156 Add smappee binary_sensor platform (#37023) 2020-06-24 14:37:48 +02:00
uvjustin
8d69a4968f Handle unexpected versions in forked_daapd zeroconf (#37053) 2020-06-24 14:19:08 +02:00
Eugene Prystupa
e3b90ea3f7 Add Plum Lightpad config flow (#36802)
* add support for config flow for Plum Lightpad integration

* add support for config flow for Plum Lightpad integration (remove unintended change to requirements_test_all.txt)

* add support for config flow for Plum Lightpad integration (fix lint issues)

* add support for config flow for Plum Lightpad integration (PR feedback)

* add support for config flow for Plum Lightpad integration (fix lint)

* Update homeassistant/components/plum_lightpad/__init__.py

use debug instead of info for logging

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

* Update homeassistant/components/plum_lightpad/strings.json

switch to use generated references instead of hard-coded strings

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

* Update homeassistant/components/plum_lightpad/strings.json

switch to use references instead of hard-coded string

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

* Update homeassistant/components/plum_lightpad/strings.json

removing translated title per suggestion

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

* Update homeassistant/components/plum_lightpad/strings.json

removing per suggestion

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

* remove unnecessary deepcopy

* remove unnecessary logging warning, since ignoring is expected for configuration.yaml scenario

* switch to hass.loop.create_task per PR feedback

* show login errors when configuring integration via UI (PR feedback)

* disable wrongly flag pylint violation

* add except handler to handle connection errors when setting up config flow entry

* address PR feedback regarding exception handling

* Update homeassistant/components/plum_lightpad/config_flow.py

use helper instead of custom code/message-id

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

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-06-23 20:40:11 -07:00
mdegat01
6c7355785a Add support for glob matching to entity filters (#36913)
* Added GLOB capability to entityfilter and every place that uses it. All existing tests are passing

* added tests for components affected by glob change

* fixed flake8 error

* mocking the correct listener

* mocking correct bus method in azure test

* tests passing in 3.7 and 3.8

* fixed formatting issue from rebase/conflict

* Checking against glob patterns in more performant way

* perf improvments and reverted unnecessarily adjusted tests

* added new benchmark test around filters

* no longer using get with default in entityfilter

* changed filter name and removed logbook from filter benchmark

* simplified benchmark tests from feedback

* fixed apache tests and returned include exclude schemas to normal

* fixed azure event hub tests to properly go through component logic

* fixed azure test and clean up for other tests

* renaming test files to match standard

* merged mqtt statestream test changes with base

* removed dependency on recorder filter schema from history

* fixed recorder tests after merge and a bunch of lint errors
2020-06-23 20:02:29 -05:00
Oscar Calvo
a1ac1fb091 Part 3: Add support for incoming sms events (#37015)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-06-23 18:02:08 -07:00
Paulus Schoutsen
8ca5a04a5d Updated frontend to 20200623.3 (#37045) 2020-06-23 17:29:39 -07:00
HomeAssistant Azure
04f75d6557 [ci skip] Translation update 2020-06-24 00:08:54 +00:00
Shulyaka
26f09bae28 Add humidifier reproduce state (#36799)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-06-23 17:00:32 -07:00
Thomas Le Gentil
2af961513d Remove fortigate integration (#34586) 2020-06-24 00:21:51 +02:00
Hedgehog57
fd1edf1bb6 Add resource_template to rest binary_sensor (#30703) 2020-06-23 15:08:55 -07:00
J. Nick Koston
152a80abed Complete deprecation of hidden attribute (ATTR_HIDDEN) (#37041) 2020-06-23 17:05:32 -05:00
Franck Nijhof
c289f9f099 Toon translation updates + tweaks (#37043) 2020-06-24 00:04:16 +02:00
Chris Talkington
ed89d4869d Fix typo in roku services description (#37042) 2020-06-24 00:00:24 +02:00
Franck Nijhof
5b4187a9eb Merge branch 'master' into dev 2020-06-23 23:22:38 +02:00
J. Nick Koston
5b79c1f9ef Remove support for deprecated hidden attribute from logbook and history (#37039) 2020-06-23 13:40:39 -07:00
Bouwe Westerdijk
b61b0321d6 Bump Plugwise_Smile to v1.1.0 (#37038) 2020-06-23 22:02:50 +02:00
Erik Montnemery
bb17cbdd83 Drop MQTT broker tls_version parameter (#37033) 2020-06-23 12:12:37 -07:00
J. Nick Koston
91e0395c1c Optimize database indexes for existing queries (#37036)
Cleanup indexes as >50% of the db size was indexes,
many of them unused in any current query

Logbook search was having to filter event_types without
an index:

  Created ix_events_event_type_time_fired
  Dropped ix_events_event_type

States had a redundant keys on composite index:

  Dropped ix_states_entity_id
  Its unused since we have ix_states_entity_id_last_updated

De-duplicate storage of context in states as
its always stored in events and can be found
by joining the state on the event_id.

  Dropped ix_states_context_id
  Dropped ix_states_context_parent_id
  Dropped ix_states_context_user_id

After schema v9:

STATES............................................ 10186       40.9%
EVENTS............................................ 5502        22.1%
IX_STATES_ENTITY_ID_LAST_UPDATED.................. 2177         8.7%
IX_EVENTS_EVENT_TYPE_TIME_FIRED................... 1910         7.7%
IX_EVENTS_CONTEXT_ID.............................. 1592         6.4%
IX_EVENTS_TIME_FIRED.............................. 1383         5.6%
IX_STATES_LAST_UPDATED............................ 1079         4.3%
IX_STATES_EVENT_ID................................ 375          1.5%
IX_EVENTS_CONTEXT_PARENT_ID....................... 347          1.4%
IX_EVENTS_CONTEXT_USER_ID......................... 346          1.4%
IX_RECORDER_RUNS_START_END........................ 1            0.004%
RECORDER_RUNS..................................... 1            0.004%
SCHEMA_CHANGES.................................... 1            0.004%
SQLITE_MASTER..................................... 1            0.004%
2020-06-23 10:57:52 -07:00
Paulus Schoutsen
a71e0a4b29 Updated frontend to 20200623.2 (#37035) 2020-06-23 10:37:32 -07:00
Erik Montnemery
4e77969f5e Drop use of mock_mqtt_component (#37013)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-06-23 10:17:22 -07:00
Shulyaka
cf6480cda0 Add humidifier device actions (#36854) 2020-06-23 10:04:51 -07:00
Erik Montnemery
1b3e5460a9 Remove embedded MQTT broker (#37032) 2020-06-23 09:51:50 -07:00
terminet85
a004e6aa68 Add new Solaredge sensors (#34525)
* Changes to be committed:
	modified:   homeassistant/components/solaredge/const.py
	modified:   homeassistant/components/solaredge/sensor.py

Solaredge as recently changed its policy about local api access, so solaredge-local doesn't work with last firmware update for almost users.
Please check https://github.com/home-assistant/core.git

Anyway the solardge remote api is still working, but doesn't got some usefull sensor information as Power SelfConsumption, Power Exported, Power Imported.
With my update, I'll fetching API energy details where  we got these new sensors.

* Grammar/syntax fix

* Indentation fix

* Black formatting fix

* isort fix

* To force re-check

* Fix too-many-nested-blocks

* Fix indentation

* Fix Black formatting :D

* Fix Redefining built-in var

* Removed comment to force check
2020-06-23 09:06:31 -07:00
Chris Talkington
6610bbe7bb Add service to trigger roku search (#37014) 2020-06-23 09:03:43 -07:00
Thomas Hollstegge
2c7876fa66 Fix alexa flash briefings after removal of api_password auth (#36789) 2020-06-23 08:58:25 -07:00
Joakim Sørensen
835f433cf7 Remove loading of legacy translations (#37021) 2020-06-23 10:58:11 +02:00
Paulus Schoutsen
9d16edc1dc Bump cloud to 0.34.7 (#37018) 2020-06-22 23:42:10 -07:00
Paulus Schoutsen
e6d814da1d Avoid Home connect test doing I/O (#37017) 2020-06-22 23:41:44 -07:00
Ville Skyttä
7c5e852303 Improve detected Huawei LTE device name (#36772)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-06-22 21:49:05 -07:00
Martin Hjelmare
149a3165e6 Fix coronavirus worldwide sum (#36737)
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-06-22 21:22:52 -07:00
Oscar Calvo
82058f0b50 Part 2: Add signal sensor (#34406) 2020-06-22 20:41:55 -07:00
celestinjr
63baf6fb0f Extend itach repeat functionality (#36535) 2020-06-22 20:30:47 -07:00
J. Nick Koston
ad6315be5c Ensure recorder runs are cleaned up during purge (#36989)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-06-22 20:10:05 -07:00
Xiaonan Shen
b4489e132c Add DataUpdateCoordinator to pihole (#36684)
Co-authored-by: Ian <vividboarder@gmail.com>
2020-06-22 18:47:37 -07:00
Robert Van Gorkom
2538cda9d4 Fix withings body hydration unit of measure to match documented unit of measure. (#36723) 2020-06-22 18:45:05 -07:00
Allison
49a153a2e5 Add "seconds" as a valid unit_of_measurement (#36811) 2020-06-22 18:40:56 -07:00
Phil Bruckner
d68148417f Retry failed Amcrest commands that change settings (#36917) 2020-06-22 18:36:41 -07:00
Franck Nijhof
8b21b415c4 Fix/Rewrite of Toon integration (#36952)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-06-22 18:22:41 -07:00
Shulyaka
c28493098a Add new humidifier entity integration (#28693)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-22 17:59:16 -07:00
Erik Montnemery
747490ab34 Support reconfiguring MQTT config entry (#36537) 2020-06-22 17:49:01 -07:00
Alex van den Hoogen
ee816ed3dd Optimize recorder MySQL tables when repacking (#36762)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-06-22 17:28:03 -07:00
Chris
16f1ef5a44 Add attribute templates to template vacuum (#36518) 2020-06-22 17:21:20 -07:00
zpetr
a2e705880d Tahoma zwave light support (#36584) 2020-06-22 17:18:14 -07:00
HomeAssistant Azure
e39997ca10 [ci skip] Translation update 2020-06-23 00:09:06 +00:00
tomtzeng
620271c782 Add new language to Google Cloud TTS (#36705) 2020-06-22 17:07:09 -07:00
Steven Looman
d974cd4606 Prevent upnp to use None values (#36803) 2020-06-22 16:39:57 -07:00
Jonas Thuresson
247df5874b Xiaomii miio vaccum clean segment service (#36801) 2020-06-22 16:37:05 -07:00
zvldz
e1060f154e Make generic camera stream_source a template (#36123)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-22 16:11:18 -07:00
Oscar Calvo
3f9e3d0905 Part 1: Support for config flow on SMS integration (#35995)
* Add support for config flow;Remove IO on main loop

* Remove not needed const

* Remove not needed method

* Small refactor

* Update homeassistant/components/sms/__init__.py

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

* Update homeassistant/components/sms/__init__.py

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

* Update homeassistant/components/sms/gateway.py

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

* Update homeassistant/components/sms/gammuasync.py

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

* Refactor gammu

* Update homeassistant/components/sms/__init__.py

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

* Fix pylint

* Apply PR feedback

* Update gammu version with async support

* Apply PR feedback

* Apply PR feedback

* Update homeassistant/components/sms/config_flow.py

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

* Update homeassistant/components/sms/config_flow.py

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

* Update homeassistant/components/sms/config_flow.py

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

* Update homeassistant/components/sms/__init__.py

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

* Update homeassistant/components/sms/config_flow.py

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

* Update homeassistant/components/sms/config_flow.py

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

* Apply PR feedback

* Apply PR feedback

* Apply PR feedback

* Update homeassistant/components/sms/__init__.py

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

* Update homeassistant/components/sms/__init__.py

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

* Update homeassistant/components/sms/strings.json

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

* Update homeassistant/components/sms/strings.json

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

* Update homeassistant/components/sms/config_flow.py

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

* Update homeassistant/components/sms/__init__.py

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

* Apply PR feedback

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-22 16:07:58 -07:00
Paulus Schoutsen
becc011135 Handle ArmDisarm execute without arm level (#36942) 2020-06-22 16:06:30 -07:00
Franck Nijhof
6660cf701d Remove lockitron integration (#37012) 2020-06-22 16:34:26 -06:00
Erik Montnemery
280f49540e Drop use of async_mock_mqtt_component (#37011) 2020-06-22 23:59:50 +02:00
Erik Montnemery
a2e2c35011 Use pytest for more MQTT tests (#36859)
* Use pytest for more MQTT tests

* Address review comments

* Break out PAHO client mock in separate fixture.

* tweak.
2020-06-22 22:02:29 +02:00
Robert Svensson
3a83f4bdbe Support guest events in UniFi device tracker (#37008) 2020-06-22 21:50:34 +02:00
Robert Svensson
02d94f2fd0 Bump Axis library to support fence guard events (#37007) 2020-06-22 21:50:05 +02:00
J. Nick Koston
53a91ece4e Improve isoformat timestamp performance (#36991)
* adj

* time_fired_isoformat

* remove unused code

* tests for processing timestamps

* restore missing import lost in merge conflict

* test for None case
2020-06-22 12:06:02 -05:00
Robert Van Gorkom
5446641f09 User defined profile name for Withings (#36864) 2020-06-22 17:55:41 +02:00
J. Nick Koston
e19c97af7c Fix history api with no constraints (#36979) 2020-06-22 10:32:46 -05:00
Franck Nijhof
7e696f19d3 Upgrade numpy to 1.19.0 (#36996) 2020-06-22 10:28:06 -05:00
Mark Coombes
6906a19c01 Bump python-ecobee-api to 0.2.7 (#37002) 2020-06-22 16:52:02 +02:00
Jürgen Haas
93f9f1b320 Add NetdataAlarms sensor to additionally collect alarm information (#34339) 2020-06-22 16:29:29 +02:00
rajlaud
3f427602ba Squeezebox config flow (#35669)
* Squeezebox add config flow and player discovery

* Fixes to config flow

* Unavailable player detection and recovery

* Improved error message for auth failure

* Testing for squeezebox config flow

* Import configuration.yaml

* Support for discovery integration

* Internal server discovery

* Fix bug restoring previously detected squeezebox player

* Tests for user and edit steps in config flow

* Tests for import config flow

* Additional config flow tests and fixes

* Linter fixes

* Check that players are found before iterating them

* Remove noisy logger message

* Update requirements_all after rebase

* Use asyncio.Event in discovery task

* Use common keys in strings.json

* Bump pysqueezebox to v0.2.2 for fixed server discovery using python3.7

* Bump pysqueezebox version to v0.2.3

* Don't trap AbortFlow exception

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

* Refactor validate_input

* Update squeezebox tests

* Build data flow schema using function

* Fix linter error

* Updated en.json

* Update homeassistant/components/squeezebox/media_player.py

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

* Update homeassistant/components/squeezebox/media_player.py

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

* Update homeassistant/components/squeezebox/media_player.py

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

* Update homeassistant/components/squeezebox/media_player.py

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

* Update .coveragerc for squeezebox config flow test

* Mock TIMEOUT for faster testing

* More schema de-duplication and testing improvements

* Apply suggestions from code review

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

* Testing and config flow improvements

* Remove unused exceptions

* Remove deprecated logger message

* Update homeassistant/components/squeezebox/media_player.py

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

* Implement suggestions from code review

* Add async_unload_entry

* Use MockConfigEntry in squeezebox tests

* Remove unnecessary config schema

* Stop server discovery task when last config entry unloaded

* Improvements to async_unload_entry

* Fix bug in _discovery arguments

* Do not await server discovery in async_setup_entry

* Do not await start server discovery in async_setup

* Do not start server discovery from async_setup_entry until homeassistant running

* Re-detect players when server removed and re-added without restart

* Use entry.entry_id instead of unique_id

* Update unittests to avoid patching homeassistant code

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-06-22 09:29:01 -05:00
J. Nick Koston
e25f216fd6 Reduce state conversion overhead in history by lazy loading properties (#36963) 2020-06-22 16:19:33 +02:00
Franck Nijhof
b47be05efc Add new Remote Python Debugger integration (#36960) 2020-06-22 15:17:59 +02:00
jjlawren
9d40ae96b5 Set Plex media_player discovery source as an attribute (#36884) 2020-06-22 14:48:40 +02:00
Franck Nijhof
f131959f4b Correct inst method names in system info and issue templates (#36998) 2020-06-22 14:46:31 +02:00
Adam Žurek
0054904454 highlight Dockerfile.dev as Dockerfile in github ui (#36933) 2020-06-22 14:45:57 +02:00
Robert Van Gorkom
5c8d8a290f Add default admin user for gogogate2 setup (#36722) 2020-06-22 13:13:10 +02:00
Filip Pytloun
dcb3a57476 Add support for daikin humidity sensor (#36475) 2020-06-22 13:10:26 +02:00
Damien Levin
78225c9ddd Set webostv scan interval to 10s for quick updates (#35795)
Co-authored-by: damien.levin@gmail.com <damienlevin@users.noreply.github.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2020-06-22 13:08:02 +02:00
Franck Nijhof
215215747e Fix use of AdGuard integration without version (#36995) 2020-06-22 13:06:59 +02:00
Gerard
5cd85f9f00 Upgrade to bimmer_connected 0.7.7 (#36985) 2020-06-22 13:06:18 +02:00
ktnrg45
4674cb406e Bump pyps4-2ndscreen to 1.1.0 (#36987) 2020-06-22 13:02:18 +02:00
James Nimmo
82b77a8108 Bump to pyIntesishome 1.7.5 (#36562) 2020-06-22 12:56:29 +02:00
starkillerOG
1f9721bad3 Add Xiaomi Aqara Config Flow (#35595)
* Xiaomi Aqara Config Flow

* Xiaomi Aqara Config Flow

* Xiaomi Aqara Config Flow

* Xiaomi Aqara Config Flow

* Xiaomi Aqara Config Flow

First tested and working version

* Remove depricated discovery

* Add Xiaomi Aqara Config Flow

* Add Xiaomi Aqara tests

* Update .coveragerc

* Update requirements_test_all.txt

* fix spelling mistake

* fix select scheme

* fix wrong conflict resolve

* add IP to zeroconf discovery title

* black styling

* add getmac requirement

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

* add getmac

* add getmac

* Clean up

* Update homeassistant/components/xiaomi_aqara/__init__.py

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

* Update homeassistant/components/xiaomi_aqara/__init__.py

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

* Update homeassistant/components/xiaomi_aqara/__init__.py

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

* Update homeassistant/components/xiaomi_aqara/__init__.py

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

* Update homeassistant/components/xiaomi_aqara/__init__.py

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

* resolve data storage

* move format_mac down

* Remove discovery_retry from config flow

* remove unused strings

* fix styling

* fix black styling

* fix tests

* remove mac connection

This is needed to prevent a conflict with the Xiaomi Miio integration that I discovered during testing.

* fix flake8

* remove getmac depandance

* check for inavlid_interface + test

* Validate gateway key

* add invalid key tests

* Fix spelling

* Only set up sensors if no key

Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-22 11:54:17 +02:00
Chris Talkington
6aba87f3a6 Use roku media state to detect paused media (#36980) 2020-06-22 09:51:38 +02:00
J. Nick Koston
edad387b12 Make recorder execute avoid native conversion by default (#36938) 2020-06-21 21:58:57 -07:00
HomeAssistant Azure
f4b8a95205 [ci skip] Translation update 2020-06-22 00:05:46 +00:00
David Ryan
29adc6a27b Support Hydrawise API v1.4 (#34448)
* Now supports Hydrawise API v1.4

* Removed dependency and codeowners name.

* Update CODEOWNERS to include hydrawise

* Changes made from review comments.

* Clean up update.

* Added device class for timestamp and switch. Consolodate methods to parent class.

* Cap next_cycle at 2 years to prevent time overflow.

* Addressed review comments.

* Updated DEVICE_MAP and icon() based on review comments.
2020-06-21 16:55:47 -05:00
Andrew Hayworth
fed6625324 Refactor / update Awair integration (#34394)
* Refactor / update Awair integration

This commit does a few things, all in service of making the Awair
integration more modern and reliable. Specifically we do the following:

- Update to python_awair 0.1.1
- Begin using config entries / flow for setting up the integration.
  - YAML support is completely removed.
  - The integration now allows adding multiple Awair accounts, should a
    user wish to do so (I found it _very_ useful in development).
- Group various Awair sensors into devices, using the device registry.
- Renames various sensors and treats the "dust" sensor as a particulate sensor.
- Device update rate-limits are no longer dynamically calculated; the
  Awair API now separates rate-limits on a per-device basis.
- Supports sound pressure and illuminance sensors found on some Awair devices.
- We report the "awair index" for certain sensors as part of device_state_attributes.
  The "index" is a subjective measure of whether or not a sensor reading
  is "good" or "bad" (and to what extent). It's a component of the Awair
  score, and it is useful on its own as an input for those who wish to
  do things like "display this color if the value is 'bad'".

This is a breaking change, and requires updates to documentation and a
warning in the README. The breaking changes in detail, are:

- Support for all YAML configuration is removed, and users will need to
  re-add the integration via the UI.
- We no longer support overriding device discovery via manual
  configuration of device UUIDs. This was previously supported because
  the Awair API had severe limits on the device list endpoints; however
  those have since been removed.
- Gen 1 devices no longer show a "dust" sensor; rather we create a PM2.5
  sensor and a PM10 sensor and just keep the values in sync. This better
  reflects the sensor capabilities: it can detect particles in a range
  from 2.5 -> 10, but cannot differentiate between sizes.
- Sensors are renamed as follows:
  - "sensor.devicename_co2"   -> "sensor.devicename_carbon_dioxide"
  - "sensor.devicename_voc"   -> "sensor.devicename_volatile_organic_compounds"
  - "sensor.devicename_score" -> "sensor.devicename_air_quality_index"
  - I've chosen to call the "Awair Score" an "air quality index" sensor,
    because fundamentally the "Awair Score" and other air quality indices
    (such as CAQI) do the same thing: they calculate a value based on a
    variety of other inputs.

Under the hood, the integration has seen some improvements:

- We use the DataUpdateCoordinator class to handle updates, rather than
  rolling our own update class.
- The code no longer tracks availability based on a timestamp returned
  from the Awair service; we assert that if we have received a response
  and the response has data for our device, then we are available (and
  otherwise, not available). We don't need to test the actual Awair API
  so heavily.
- Test coverage has been expanded to handle a variety of products that
  Awair produces, not just the one I happen to own.
- Test coverage no longer concerns itself with testing behavior that is
  now handled by the DataUpdateCoordinator; nor is it concerned with
  ensuring that the overall component sets up and registers properly.
  These are assumed to be well-tested functionaity of the core and not
  things we need to re-test ourselves.

Finally - between library updates and integration updates, this
integration is well-positioned to support future updates. I have a
proof-of-concept patch for device automations, and the underlying
library now supports subclassing authentication (which clears the way
for us to use OAuth authentication for Awair).

* Wrap test fixture in mock_coro

Truthfully I'm not sure why this was passing on my local dev
environment, but I was developing with python 3.8 before. After
installing python 3.7, I was able to reproduce the CI failures and fix
them.

* Fix broken tests after #34901 and/or #34989

* Do not rename sensors so broadly

We're going to keep the sensors named as they were before, pending the
outcome of any decisions around the air_quality component and what names
should be standardized for air-quality-like devices.

If standardized names are selected (which does seem likely), then we
will update this integration to match them - at which point, it would be
a breaking change.

But for now, we'll keep names mostly identical to what users had before.

Notable in this commit is that we generate the entity_id ourselves,
rather than just allowing it to be auto-generated from the name
attribute. This allows us to provide more human friendly names, while
keeping the old format for entity ids. For example, given an Awair
device called "Living Room", we'll generate an entity id of
"sensor.living_room_voc" but show set the name of the device to "Living
Room Volatile organic compounds".

* Support import from config.yaml

We'll create a config entry from config.yaml the first time we're
loaded, and then defer to it from then on.

We ignore all keys other than the access_token, since we no longer need
to deal with per-account rate-limits (rather, everything is per-device
now).

* Add myself to CODEOWNERS

Since I wrote the initial integration, and now this re-write, it feels
appropriate for me to take care of the integration along with `danielsjf`.

* Remove name mangling

* Update homeassistant/components/awair/manifest.json

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

* Update homeassistant/components/awair/config_flow.py

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

* Update homeassistant/components/awair/sensor.py

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

* Update homeassistant/components/awair/sensor.py

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

* Address some review feedback

* Set up reauth flow in a job, rather than awaiting

* Remove unnecessary title string

* Remove unnecessary config schema checking

As pointed out in review, because this comes in via import from
`configuration.yaml`, we can rely on the `PLATFORM_SCHEMA` validation instead.

* Fix tests

* Set unique_id appropriately for legacy devices

For users who have had this integration already installed (and who have
updated their home assistant installation sometime in recent history),
we want to ensure that unique_id's are set to the same thing as before,
to facilitate the upgrade process.

To do that, we add an additional property to the `SENSOR_TYPES` dict
(`ATTR_UNIQUE_ID`) which allows us to map modern sensor names from
python_awair to what older versions called them - ie: `humidity` ->
`HUMID`. We then use that value when constructing the unique ID. This
should allow users to upgrade and not lose configuration even if entity
IDs would otherwise change (because we have changed the name format that
generates entity IDs).

One note is that for the gen1 `DUST` sensor, we have to treat it
differently. This integration used to call that a "PM2.5" sensor, but
the unique_id generated would be something like `awair_12345_DUST`. So
we special-case that sensor, and do the same thing. We do not need to
special-case the PM10 sensor for gen1 devices, because we didn't create
a PM10 sensor in the past (we do now, because the "DUST" sensor is
really a hybrid PM2.5/PM10 sensor).

* Patch async_setup_entry for two tests

* Update awair config_flow to require / use an email address for unique_id

Also, only start one re-auth flow.

* Add a few more tests, try to get coverage up.

* Add another test

* Move attribution to device_state_attributes

* Don't require email

* Switch from Union[dict, None] to Optional[dict]

* Use a mock where requested

* Fix missing constant rename

* Use async_create_task

* Bump test coverage a bit for config_flow

* s/CONF_UNIQUE_ID/UNIQUE_ID/g

* Add warning about deprecated platform config

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-21 21:46:07 +02:00
J. Nick Koston
1de97e3a35 Fix logbook filtering by entity id (#36973)
* Fix logbook filtering by entity_id

* remove debug
2020-06-21 14:34:47 -05:00
Chris Talkington
a6536bb622 Update rokuecp to 0.5.0 (#36975)
* update rokuecp to 0.5.0

* Update requirements_all.txt

* Update requirements_test_all.txt

* add aiohttp mock for media-player

* Create media-player-close.xml

* Update media-player-close.xml

* Create media-player-play.xml

* Create active-app-pluto.xml

* Update apps.xml

* Update apps-tv.xml

* Create media-player-pause.xml

* Create media-player-live.xml

* Update __init__.py
2020-06-21 14:29:39 -05:00
J. Nick Koston
59e43ab6e4 Prefilter more logbook events in sql (#36958)
* Prefilter more logbook events in sql

Prefilter sensor events in _keep_event before humanify

Cache static attribute lookup

Reduces logbook execution time by ~35%

* fix mocking in benchmark

* Update tests for logbook users
2020-06-21 10:50:58 -07:00
Tom Brien
29f128eaad Handle Mobile App registrations for device names containing of only emoji (#36957) 2020-06-21 18:12:15 +02:00
AJ Schmidt
d88efe405e Add armed_night state for AlarmDecoder (#36695)
* add arm night state

* quick refactor
2020-06-21 17:03:36 +02:00
Brian Rogers
f866ff5f2b Rachio Rain Delay Switch Update (#36909)
* Rain Delay Switch Update

* Fix sort

* Update names
2020-06-21 08:53:54 -05:00
Ziv
efa0e1b2ac Dynalite integration - upgrade library version (#36954) 2020-06-21 11:42:34 +02:00
Chris Talkington
4a432781ca Reduce roku scan interval by 5s (#36966) 2020-06-21 11:40:05 +02:00
Michael J. Kidd
6c2dc521a3 Adding PM2.5 and PM2.5 24hr Average (#36967)
* Adding PM2.5 and PM2.5 24hr Average

* Corrected unit to const.py CONCENTRATION_MICROGRAMS_PER_CUBIC_METER

* Imported CONCENTRATION_MICROGRAMS_PER_CUBIC_METER for PM2.5 units

* Fixed code formatting with `black`
2020-06-20 22:14:35 -06:00
HomeAssistant Azure
b112a742b2 [ci skip] Translation update 2020-06-21 00:10:03 +00:00
Franck Nijhof
46cb9cff41 Fix ESPHome discovery for ignored config entries (#36964) 2020-06-21 00:39:08 +02:00
Fredrik Erlandsson
9f65dcf4ba Fix unique_id in Zeroconf flow (#36948) 2020-06-20 22:59:25 +02:00
Davide Varricchio
13c0a59e28 Bump pyaehw4a1 to v.0.3.5 (#36949) 2020-06-20 19:14:27 +02:00
Bram Kragten
7d69b90eac Update frontend to 20200620.0 and add redirects (#36953) 2020-06-20 19:05:22 +02:00
Franck Nijhof
60dd94d5b0 Upgrade ptvsd to 4.3.2 (#36950) 2020-06-20 14:25:02 +02:00
avocadio
2196bd66c7 Add TTS support to Heos (#35386)
* TTS seems unsupported on heos media player #32862 

TTS seems unsupported on heos media player #32862 

The type media_type music which is required by TTS was not covered.

* Update homeassistant/components/heos/media_player.py

Co-authored-by: Andrew Sayre <6730289+andrewsayre@users.noreply.github.com>

* Update to test_media_player.py

Test for TTS support to Heos #35386

* Update test

Add TTS support to Heos #35386

* Update to test_play_media_music

assert set to "Unable to play music: Failure (1)" seems to cause an issue.

* test_play_media_music

syntax

Co-authored-by: Andrew Sayre <6730289+andrewsayre@users.noreply.github.com>
2020-06-20 09:54:44 +02:00
Paulus Schoutsen
8895f9b70a Remove unused webhook dependency from device automation (#36946) 2020-06-20 09:11:17 +02:00
Kit Klein
a074cf4afd Use chip id in Konnected pro boards (#36940)
* use chip id in pro boards

* cleaner failover
2020-06-20 08:39:04 +02:00
ehendrix23
2fd6431cff Allow harmony activity change on start of switching activity (#36699)
* Allow activity change on start of switch

Allow activity to be updated when a switch to a new activity is initiated instead of when it is completed.

* Updates based on feedback

Some items are not required to be done as YAML is not used anymore.
Cleaned-up some code.

* Fix for change on how to set callbacks

How callbacks are set now one has to set the new_activity and new_activity_starting as well, even just with None.

* Added callback update

Added so that when it is changed in the UI the callbacks will be changed as well.

* Added test cases for notify setting

Added test cases for config flow to test new setting for activity notifications.
2020-06-19 21:50:42 -05:00
Paulus Schoutsen
5642027ffb Improve after_dependencies handling (#36898) 2020-06-19 17:24:33 -07:00
HomeAssistant Azure
93272e3083 [ci skip] Translation update 2020-06-20 00:09:26 +00:00
J. Nick Koston
2b5e7c2611 Fix recorder stopping after unserializable state (#36937)
* Ensure unserializable states do not collapse recording

* augment test coverage

* fix wal mode being set every time
2020-06-19 12:03:06 -05:00
Franck Nijhof
683d960fa5 Add discovery to NUT integration (#36827)
* Add discovery to NUT integration

* implement async_step_zeroconf

* Update test to make sure unique id not set

* Remove host/port import when coming from discovery, add title placeholders

* fix mis-paste

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-06-19 17:33:01 +02:00
jjlawren
d445c16697 Handle Plex Live TV sessions (#36919) 2020-06-19 17:12:47 +02:00
Markus Bong
e4df0481da Fix devolo brand name (#36865) 2020-06-19 17:04:31 +02:00
jjlawren
3d1a5f76b2 Fix cert_expiry time-based tests v2 (#36934) 2020-06-19 16:19:43 +02:00
Paulus Schoutsen
263bdaa565 Make panel_custom backwards compatible (#36926) 2020-06-19 16:03:39 +02:00
craiggenner
212660330f Cope with attribute errors being converted (#36911) 2020-06-19 05:36:56 +02:00
HomeAssistant Azure
f83d4e524b [ci skip] Translation update 2020-06-19 00:10:18 +00:00
jjlawren
6bffd9a892 Fix cert_expiry time-based tests (#36924) 2020-06-19 00:26:34 +02:00
Robert Svensson
02e03340df Light control support to Axis devices (#36611)
* IR light support to Axis devices

* Change how to read light state

* Add tests

* Bump dependency to v32

* Assert variables passed to set_intensity
2020-06-18 23:27:08 +02:00
jjlawren
e92e26b73a Add expiration timestamp to cert_expiry sensors (#36399)
* Add expiration timestamp to cert_expiry sensors

* Clear timestamp if cert becomes invalid

* Use timezone-aware timestamps

* Use DataUpdateCoordinator, split timestamp to separate sensor

* Use UTC, simpler add/remove handling

* Review fixes

* Fix incomplete mock that fails in 3.8

* Use static timestamps, improve helper method name
2020-06-18 18:29:46 +02:00
Paulus Schoutsen
f69fc79fd1 Bump Netdisco to 2.7.1 (#36891) 2020-06-18 13:08:43 +02:00
J. Nick Koston
e7d982ee11 Improve db performance of state change events and reduce overall db size (#36883)
* Add old_state_id to states, remove old/new state data from events since it can now be found by a join

* remove state lookup on restart

* Ensure old_state is set for exisitng states
2020-06-17 22:26:41 -05:00
Paulus Schoutsen
94132e5572 Add internal/external url to safe mode (#36894) 2020-06-17 17:14:48 -07:00
HomeAssistant Azure
7920c5e5e8 [ci skip] Translation update 2020-06-18 00:08:13 +00:00
Paulus Schoutsen
df59f87f34 Upgrade requests to 2.24.0 (#36886) 2020-06-17 16:26:29 -07:00
Paulus Schoutsen
c0a2e6b655 Merge pull request #36885 from home-assistant/rc 2020-06-17 16:23:37 -07:00
Paulus Schoutsen
b4b2302e04 Fix test 2020-06-17 16:23:10 -07:00
Phil Bruckner
098d82f4d3 Fix yr HTTP error handling (#36889) 2020-06-17 13:40:22 -07:00
Phil Bruckner
2883aacfa3 Fix yr HTTP error handling (#36889) 2020-06-17 13:40:04 -07:00
jjlawren
ec440dface Bump plexwebsocket to 0.0.11 (#36879) 2020-06-17 15:28:22 -05:00
J. Nick Koston
3d385796da Improve logbook performance when no entities are filtered (#36842)
Various tweaks to reduce the python overhead of
the lazy class
2020-06-17 13:23:42 -07:00
Paulus Schoutsen
3e14b2dc61 Bumped version to 0.111.4 2020-06-17 12:53:30 -07:00
Paulus Schoutsen
7547a92479 Upgrade pymetno (#36880) 2020-06-17 12:22:56 -07:00
Fredrik Erlandsson
625c2aa19d Fix Daikin zeroconf discovery flow error (#36868) 2020-06-17 12:22:35 -07:00
Robert Svensson
ec69edcb79 Bump Axis dependency to fix issue where ports dont initialize (#36860) 2020-06-17 12:18:26 -07:00
fb22
f823afeadc Fix llamalab_automate notify priority (#36845) 2020-06-17 12:18:25 -07:00
Paulus Schoutsen
903db07feb Onboarding to validate redirect uri (#36863) 2020-06-17 12:13:28 -07:00
Paulus Schoutsen
43cee39528 Upgrade pymetno (#36880) 2020-06-17 12:12:50 -07:00
jjlawren
d5cc3208af Discover controllable Plex clients using plex.tv (#36857) 2020-06-17 12:04:47 -07:00
Robert Svensson
94c8d74a66 Bump Axis dependency to fix issue where ports dont initialize (#36860) 2020-06-17 11:07:19 -07:00
Fredrik Erlandsson
b3c851502d Fix Daikin zeroconf discovery flow error (#36868) 2020-06-17 16:53:29 +02:00
Jeffery To
a74e35795c Use the built-in importlib.metadata library in Python 3.8+ (#36225)
importlib_metadata is a backport of this library for Python 3.7 and
older.
2020-06-17 15:21:14 +02:00
Josef Schlehofer
b464096edb Upgrade youtube_dl to version 2020.06.16.1 (#36870) 2020-06-17 15:05:01 +02:00
bsmappee
5228282f69 Renew Smappee (sensors and switches) (#36445)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-17 13:28:28 +02:00
Sean Nyekjær
fd67a079db Add ebusd HotWaterHeader ActualTemperature and OperationMode (#34921) 2020-06-17 13:26:19 +02:00
Bas Nijholt
3ae4eba457 Bump aiokef 0.2.12 (#36753) 2020-06-16 23:15:49 -07:00
marawan31
dba326f16b Add precipitation probability to weather forcast (#36019)
* Add precipitation probability attribute

* bump env_canada version to 0.0.38 in manifest

* bump env_canada version to 0.0.38 in requirements

* Add support for percipiation probability

* formated project with black

* make sure prob is an int

* fix build break

* update usage to correct naming

* revert bad change and apply fix build break

* add tests
2020-06-17 07:39:33 +02:00
HomeAssistant Azure
2b06fbbcf0 [ci skip] Translation update 2020-06-17 00:11:42 +00:00
indykoning
d278dd9477 Add growatt battery devices (#34773)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-16 21:16:29 +02:00
Adam Belebczuk
fe03c9da68 Update Wemo state when changing state (#36647) 2020-06-16 21:14:04 +02:00
Robert Van Gorkom
a6a6a7b69c Add Withings webhooks (#34447)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-16 20:16:18 +02:00
Tom
29df13abe9 Fix Plugwise schema name display and non_device_class icons (#36815)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Bouwe Westerdijk <11290930+bouwew@users.noreply.github.com>
2020-06-16 14:49:13 +02:00
starkillerOG
6db5ff98ed DenonAVR Config Flow (#35255)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-16 14:46:39 +02:00
Philip Allgaier
25607c7129 Use MDI CPU icon for glances (#36736)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-16 14:44:37 +02:00
Michael Auchter
58f1d1754e Fix remote_rpi_gpio switch inversion (#34390)
This removes the double-inversion of switches on the remote_rpi_gpio
platform.

Fixes #24571
2020-06-16 14:42:21 +02:00
fb22
6273ad85f8 Fix llamalab_automate notify priority (#36845) 2020-06-16 12:42:12 +02:00
Kevin Fronczak
a68af0a3a9 Add blink tests (#36672)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-16 11:05:33 +02:00
etheralm
f8de0594b9 Add support for Dyson Pure HP04 purifying heater + fan (#34537)
* fix unnecesary checks

* change ClimateDevice to ClimateEntity

* Clean up

* Formatting

* Fix tests

* Clean tests

* Clean up tests

* Fix device mock

* Use safer patch target path

* Extract constant

* Remove not needed property

* Guard for missing target temperature

* Use async_mock mocks

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-16 05:31:11 +01:00
Zac West
8541ae0360 mobile_app: Camera Stream Webhook (#36839) 2020-06-15 19:09:53 -07:00
Paulus Schoutsen
dfc345a921 Merge pull request #36840 from home-assistant/rc 2020-06-15 17:32:52 -07:00
HomeAssistant Azure
87f236c05c [ci skip] Translation update 2020-06-16 00:03:16 +00:00
Paulus Schoutsen
0127974f09 Bumped version to 0.111.3 2020-06-15 16:35:41 -07:00
Paulus Schoutsen
108082fd07 Fix cloudhooks coming in for non existing webhooks (#36836)
* Fix cloudhooks coming in for non existing webhooks

* Fix tests"
2020-06-15 16:35:32 -07:00
kennedyshead
61d6bd0cb5 Bump aioasuswrt to 1.2.6 (#36820)
Co-authored-by: magnusknutas <magnus@thefarm.se>
2020-06-15 16:35:32 -07:00
Paulus Schoutsen
3a2138131c Fire config changed event during start (#36812) 2020-06-15 16:35:31 -07:00
Tom Harris
ec65ebacd3 Fix X10 devices and adding default links (#36807) 2020-06-15 16:35:30 -07:00
David F. Mulcahey
b45e49902c Bump ZHA quirks (#36797) 2020-06-15 16:35:29 -07:00
N1c093
12781bf842 Fix nanoleaf attribute when running an effect (#36794) 2020-06-15 16:35:28 -07:00
J. Nick Koston
d0ca8e62a4 Fix history graphs with mysql/mariadb (#36769) 2020-06-15 16:35:27 -07:00
Franck Nijhof
c37cd835b9 Upgrade wled 0.4.3 (#36760) 2020-06-15 16:35:27 -07:00
Paulus Schoutsen
3ee3ae7633 Fix cloudhooks coming in for non existing webhooks (#36836)
* Fix cloudhooks coming in for non existing webhooks

* Fix tests"
2020-06-15 16:30:40 -07:00
Franck Nijhof
02f174e2e6 Add support for multiple states/zones in conditions (#36835)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-06-16 00:53:13 +02:00
Erik Montnemery
16cf16e418 Update MQTT tests to not create duplicated config entries (#36833) 2020-06-15 15:38:56 -07:00
Paulus Schoutsen
de12c21ce7 Fire config changed event during start (#36812) 2020-06-15 15:22:53 -07:00
J. Nick Koston
b8c9f67533 Remove context_id from logbook api (#36796)
Reduces size of api response, execution, and download time.
2020-06-15 16:13:07 -05:00
Franck Nijhof
ba73ac12ba Add support for multiple entity_ids in conditions (#36817) 2020-06-15 22:54:19 +02:00
J. Nick Koston
0a219081ea Only process logbook timestamps for events we will keep (#36792)
* Only process logbook timestamps for events we will keep

Since we group by minute we were previously processing
every timestamp. We can avoid this by making all the
minute checks use the unprocessed datetime since
the groupings will be the same regardless of timezone.

This reduces the number of datetime object recreations
by at least an order of magnitude.
2020-06-15 14:54:20 -05:00
J. Nick Koston
b0163b65c6 Use states to avoid decoding logbook state changed events. (#36768)
avg 4.43s -> 1.88s
2020-06-15 13:53:05 -05:00
J. Nick Koston
83e3f680bf Improve history api performance part 4 (#36783)
This builds on #35822

Minimize the amount of data selected from
the database

Testing:

History API Response time for 1 day
Average of 10 runs with minimal_response

Before: 9.47s
After: 4.43s
2020-06-15 11:02:36 -07:00
J. Nick Koston
e443dc1274 Speed up logbook with a lazy event decoder (#36730) 2020-06-15 10:53:38 -07:00
N1c093
717a21dc7b Fix nanoleaf attribute when running an effect (#36794) 2020-06-15 18:17:54 +02:00
kennedyshead
1b6f0b78aa Bump aioasuswrt to 1.2.6 (#36820)
Co-authored-by: magnusknutas <magnus@thefarm.se>
2020-06-15 14:14:48 +02:00
michaeldavie
e8d4a25635 Add missing dependencies for Environment Canada (#36806) 2020-06-15 13:54:58 +02:00
Tom Harris
162e502962 Fix X10 devices and adding default links (#36807) 2020-06-15 13:49:39 +02:00
Franck Nijhof
3cc94f7d6a ConfigFlow default discovery without unique ID (#36754) 2020-06-15 13:38:38 +02:00
Paulus Schoutsen
dfac9c5e03 Fix TTS key by hashing options values too (#36813) 2020-06-15 13:33:26 +02:00
Ian Harcombe
c96458c7e4 Convert MetOffice to use UI for configuration (#34900)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-15 12:02:25 +02:00
AJ Schmidt
9a867cbb75 Add alarmdecoder brand specific arming sequences (#36692)
* add adext

* rm new config parameter

* update adext
2020-06-15 10:05:45 +02:00
HomeAssistant Azure
b15caf31a9 [ci skip] Translation update 2020-06-15 00:03:32 +00:00
Tom Schneider
0331ebdd47 Add HVV integration (Hamburg public transportation) (#31564)
Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-15 00:15:20 +02:00
Ville Skyttä
0b7d2aa4d7 Add unique id to huawei_lte config entries (#36765) 2020-06-14 23:05:43 +02:00
David F. Mulcahey
821de0e369 Bump ZHA quirks (#36797) 2020-06-14 14:47:36 -04:00
Paulus Schoutsen
02bcdf5162 Fix translations download (#36770) 2020-06-14 11:38:05 -07:00
Benoit Louy
e7e2f4e786 Set default pjlink timeout (#36781)
* make pjlink timeout configurable

* fix format

* remove timeout configuration and use a default value instead
2020-06-14 20:23:59 +02:00
Eugene Prystupa
e969d364e6 Refactor plum_lightpad (#36761) 2020-06-14 13:59:49 +02:00
Franck Nijhof
4862f6d516 Upgrade wled 0.4.3 (#36760) 2020-06-13 22:29:33 -07:00
Alexei Chetroi
36ed3b1177 Add pi_heating/cooling_demand state attributes (#36775) 2020-06-14 00:25:25 -04:00
J. Nick Koston
9cc20fc6b8 Fix history graphs with mysql/mariadb (#36769) 2020-06-13 21:22:16 -07:00
HomeAssistant Azure
dd239661e7 [ci skip] Translation update 2020-06-14 00:03:01 +00:00
Martin
0bbb56dd05 Add sensor platform for vicare integration (heatpump) (#34385)
* Add sensor platform for vicare (heatpump)

* Formatting and fixes

* Formatting and fixes 2

* Fixes and formatting 3

* Fixes and formatting 4

* Add binary_sensor and more sensors

This moves some more climate attributes to sensors and adds
binary_sensors

* Move ActiveError back to climate component

The data returned by ActiveError is more complex.
It takes further investigation on how to interpret it a s a binary sensor.
Therefore it is moved back as an attribute of the climate component

* Update PyViCare library

* PR changes

* PR changes 2

Co-authored-by: Hans Oischinger <hans.oischinger@gmail.com>
2020-06-13 21:53:42 +02:00
Bram Kragten
0bfcb99c04 Updated frontend to 20200613.0 (#36758) 2020-06-13 20:17:58 +02:00
Robert Van Gorkom
bdd255176c Poll all status data in Vera (#35703)
* Vera now polls for all status data, no only incremental.
Vera polling is not handled using hass event loops with proper backoffs.

* Using long polling.

* Addressing PR feedback.

* Addressing PR feedback.
Adding controller stop on config unload.
2020-06-13 16:36:50 +02:00
Franck Nijhof
e5f08ee657 Merge pull request #36756 from home-assistant/rc 2020-06-13 15:01:30 +02:00
Bram Kragten
12c649ba27 Bumped version to 0.111.2 2020-06-13 12:49:19 +02:00
Bram Kragten
5eb7f5fcf3 Update frontend to 20200603.3 (#36751) 2020-06-13 12:48:19 +02:00
J. Nick Koston
48b6f41048 Fix history timezone with postgres and other dbs (#36746) 2020-06-13 12:48:18 +02:00
Robert Svensson
16d045aa9f Make Axis non-privileged users work again (#36731) 2020-06-13 12:48:18 +02:00
Franck Nijhof
66ad69bff3 Fix logbook filtering for described events (#36727) 2020-06-13 12:46:57 +02:00
Fredrik Erlandsson
599288dae2 Fix Daikin discovery (#36704) 2020-06-13 12:37:44 +02:00
Alexei Chetroi
2594f11b34 Fix ZHA Metering channel formatting method (#36697)
Since zigpy change to support bitmap classes, formatting string was incorrectly generated for the newly joined devices with SmartEnergy metering clusters.
2020-06-13 12:37:44 +02:00
jjlawren
ad7edb4abe Fix missing options in Plex config entry (#36683) 2020-06-13 12:37:43 +02:00
Paulus Schoutsen
9e73853d65 Guard OwnTracks writing state before hass available (#36680) 2020-06-13 12:37:42 +02:00
zewelor
504cb26329 Fix nightlight support detection (#36656) 2020-06-13 12:37:41 +02:00
Bram Kragten
20428e670b Update frontend to 20200603.3 (#36751) 2020-06-13 12:36:16 +02:00
Robert Svensson
78af0a4705 Make Axis non-privileged users work again (#36731) 2020-06-13 12:35:52 +02:00
J. Nick Koston
65e9e4a2f3 Fix history timezone with postgres and other dbs (#36746) 2020-06-13 12:32:01 +02:00
Erik Montnemery
922b332766 Update config_entry_flow test test_user_has_confirmation (#36633)
* Update test_user_has_confirmation

* Rewrite test according to review comment
2020-06-13 06:43:13 +02:00
Paulus Schoutsen
1ffa8fcbba Platforms cleanup when adding entity fails (#36742) 2020-06-12 17:54:46 -07:00
Franck Nijhof
785786ecd1 Upgrade pytest-cov to 2.10.0 (#36720) 2020-06-13 02:37:59 +02:00
Shane Qi
b78ad7c2b8 Implement device_info for LutronCasetaDevice (#36706) 2020-06-13 02:27:48 +02:00
HomeAssistant Azure
4412ce3b86 [ci skip] Translation update 2020-06-13 00:03:58 +00:00
Franck Nijhof
238430136e Migrate script to use describe_event for logbook (#36729) 2020-06-12 16:44:29 -07:00
mvn23
15113ae854 Add opentherm_gw.set_hot_water_setpoint service (#34579) 2020-06-12 23:15:04 +02:00
mreiling
7ce6ae9421 Bump pynx584 to 0.5 (#36615) 2020-06-12 15:54:19 -04:00
mdegat01
f9bc0c9dab Add influx 2.0 and InfluxCloud support to InfluxDB integration (#35392) 2020-06-12 21:29:46 +02:00
Franck Nijhof
bf95658e24 Fix logbook filtering for described events (#36727) 2020-06-12 20:45:17 +02:00
Paulus Schoutsen
3c57475c8f Guard OwnTracks writing state before hass available (#36680) 2020-06-12 09:27:51 -07:00
Paulus Schoutsen
e8b16f0dfd Enforce unique ID for Hassio discovery (#36671) 2020-06-12 17:38:38 +02:00
Fredrik Erlandsson
c1cf3679aa Fix Daikin discovery (#36704) 2020-06-12 17:25:18 +02:00
zewelor
871afd2bf2 Remove Yeelight model to device type mapping (#36658) 2020-06-12 14:51:48 +02:00
Alexei Chetroi
5595ef0783 Drop ZHA sensor for Analog/Multistate input clusters (#36696) 2020-06-12 06:08:11 -04:00
Alexei Chetroi
5a3e0c6b25 Cleanup zha.storage from stale devices (#36700) 2020-06-12 06:07:34 -04:00
Paulus Schoutsen
a8e9ccbf1a Improve cloud error handling (#36670) 2020-06-11 22:56:00 -07:00
MarBra
44708ed8bb Add timers to xiaomi_miio vacuum (#35417)
* Add timers to xiaomi_miio vacuum

* Add timezone

* Add cron and next_schedule

* Use next_schedule from backend library

* Use as_utc from utils
2020-06-12 06:39:19 +02:00
Alexei Chetroi
8e44d797a3 Fix ZHA Metering channel formatting method (#36697)
Since zigpy change to support bitmap classes, formatting string was incorrectly generated for the newly joined devices with SmartEnergy metering clusters.
2020-06-11 22:37:07 -04:00
HomeAssistant Azure
419a92db43 [ci skip] Translation update 2020-06-12 00:07:41 +00:00
zewelor
986853d497 Fix nightlight support detection (#36656) 2020-06-11 15:46:00 -07:00
jjlawren
d4d233536f Fix missing options in Plex config entry (#36683) 2020-06-11 15:45:00 -07:00
Alexei Chetroi
21acdbbbfd Refactor ZHA Entity availability tracking (#36645)
* Refactor ZHA entity availability

ZHA entity availability tracks on underlying ZHA device availability.

* Update device status without signal.

* Update tests.

* Fix tests.

* Tests for restored devices availability.

* Guard against empty last_seen entry

Refactor device loading a bit.
2020-06-11 17:21:08 -04:00
Paulus Schoutsen
394966e979 Merge pull request #36673 from home-assistant/rc 2020-06-11 12:01:47 -07:00
Franck Nijhof
aac7cf129d Fix packages when config schema is fully deprecated (#36674)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-06-11 11:00:06 -07:00
Franck Nijhof
0146f35687 Fix packages when config schema is fully deprecated (#36674)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-06-11 10:59:52 -07:00
Paulus Schoutsen
e2c9af42e8 Bumped version to 0.111.1 2020-06-11 10:15:52 -07:00
J. Nick Koston
c9c8e8160f Remove powerwall attributes no longer present in latest firmware (#36667) 2020-06-11 10:15:35 -07:00
J. Nick Koston
c5972690ac Update pymyq for latest api requirements (#36666) 2020-06-11 10:15:34 -07:00
starkillerOG
c2a261370e Xiaomi Miio gateway: add ip to zeroconf discovery title (#36653)
* add ip to discovery title of xiaomi miio gateway

* add flow title to identify multiple gateways by IP

* clearify gateway token

* black formatting

* grammer improvements

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

* grammer improvements

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

Co-authored-by: Franck Nijhof <git@frenck.dev>
2020-06-11 10:15:33 -07:00
Fredrik Erlandsson
4c139076ef Fix Daikin config flow for zeroconf devices (#36571) 2020-06-11 10:15:32 -07:00
Xiaonan Shen
4bccb6e72b Fix command line sensors removing quotes with template (#35559)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-11 10:15:31 -07:00
Paulus Schoutsen
f05288b597 Update translations 2020-06-11 10:15:19 -07:00
J. Nick Koston
2d5faaf3f8 Remove powerwall attributes no longer present in latest firmware (#36667) 2020-06-11 10:15:02 -07:00
Paulus Schoutsen
dd6d18102f Update translations 2020-06-11 10:13:42 -07:00
J. Nick Koston
14d715e7fc Update pymyq for latest api requirements (#36666) 2020-06-11 08:40:51 -07:00
starkillerOG
b820b7c47d Xiaomi Miio gateway: add ip to zeroconf discovery title (#36653)
* add ip to discovery title of xiaomi miio gateway

* add flow title to identify multiple gateways by IP

* clearify gateway token

* black formatting

* grammer improvements

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

* grammer improvements

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

Co-authored-by: Franck Nijhof <git@frenck.dev>
2020-06-11 17:12:19 +02:00
Tony Phan
afe4647896 Add icon_type as configuration variable (#36594) 2020-06-11 00:11:46 -07:00
Alexei Chetroi
4df186787a Update ZHA dependencies (#36646) 2020-06-10 23:05:14 -04:00
HomeAssistant Azure
b353f45d84 [ci skip] Translation update 2020-06-11 00:02:36 +00:00
Yue Kang
fc2c195ed4 Update Baidu TTS to support more voice (#36532) 2020-06-11 01:00:56 +02:00
Janitha Karunaratne
f1d5f95f7c Allow specifying port for wake_on_lan (#36510) 2020-06-11 00:05:24 +02:00
Franck Nijhof
59f935beb0 Use async_on_remove for WLED DataUpdateCoordinator (#36640) 2020-06-10 16:02:45 -06:00
Franck Nijhof
ddb85cee7b Remove internal qa scale from numato integration (#36629) 2020-06-10 22:55:17 +02:00
Erik Montnemery
14bff5a375 Abort other config flows on import (#36608)
* Abort other flows on import

* Add test
2020-06-10 22:46:14 +02:00
springstan
9311b02369 Use LENGTH_FEET constant (#34053) 2020-06-10 21:38:29 +02:00
Kevin Fronczak
82090f5060 Add options flow to Blink (#35645) 2020-06-10 18:38:17 +02:00
Franck Nijhof
186a299215 Fix name of devolo_home_control integration (#36627) 2020-06-10 18:36:34 +02:00
Fredrik Rambris
00068e88b0 Add ue_smart_radio multiple devices support (#36575) 2020-06-10 18:35:09 +02:00
Rami Mosleh
2c1a76cf92 Add Speedtestdotnet config_flow (#36254) 2020-06-10 18:33:48 +02:00
Xiaonan Shen
c65e72886c Fix command line sensors removing quotes with template (#35559)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-10 18:31:59 +02:00
Franck Nijhof
e13f206a06 Merge branch 'master' into dev 2020-06-10 16:58:51 +02:00
Franck Nijhof
818b45384d Merge pull request #36626 from home-assistant/rc 2020-06-10 16:07:38 +02:00
Franck Nijhof
8d405c4585 Upgrade pre-commit to 2.5.1 (#36623) 2020-06-10 15:22:42 +02:00
Igor Gocalinski
2ac4d30736 Add delay in emulated_hue after PUT (#35307) 2020-06-10 15:15:32 +02:00
Fredrik Erlandsson
fa17e6d5ab Fix Daikin config flow for zeroconf devices (#36571) 2020-06-10 15:04:59 +02:00
Franck Nijhof
1bbd05dee7 Bumped version to 0.111.0 2020-06-10 14:58:56 +02:00
Martin Hjelmare
d6f7a984b2 Bump coronavirus to 1.1.1 (#36614) 2020-06-10 14:01:48 +02:00
Paulus Schoutsen
01756011ff Bump hass-nabucasa to 0.34.6 (#36613) 2020-06-10 14:01:44 +02:00
Bram Kragten
d7ad974244 Escape <> in owntracks translations (#36612) 2020-06-10 14:01:39 +02:00
SukramJ
212b9df87d Bump dependency & add devices for HomematicIP Cloud (#36595)
* update dependency and test data

* Add test for HmIP-SWDO-PL

* Add device HmIP-MOD-HO

* Fix test
2020-06-10 11:34:14 +02:00
J. Nick Koston
44552937b6 Fix missing space in powerwall notification message (#36603) 2020-06-10 11:29:56 +02:00
Paulus Schoutsen
8f3c84b349 Mark config dependency of frontend (#36587) 2020-06-09 23:27:47 -07:00
Ville Skyttä
29b8f76e57 Use past tense in messages for already invalidated deprecated configs (#36591) 2020-06-09 23:26:55 -07:00
Robin Wohlers-Reichel
29838ce1ed Bump solax library to 0.2.3 (#36600)
* Bump solax library to 0.2.3

* oops
2020-06-09 19:34:46 -06:00
Martin Hjelmare
5cf753422b Bump coronavirus to 1.1.1 (#36614) 2020-06-09 19:34:16 -06:00
HomeAssistant Azure
ded5329f03 [ci skip] Translation update 2020-06-10 00:05:07 +00:00
Paulus Schoutsen
e3fc59ff3d Bump hass-nabucasa to 0.34.6 (#36613) 2020-06-09 16:40:08 -07:00
Bram Kragten
6166a7191b Escape <> in owntracks translations (#36612) 2020-06-09 16:09:34 -07:00
Paulus Schoutsen
a69938afa2 Bumped version to 0.111.0b5 2020-06-09 12:39:29 -07:00
Paulus Schoutsen
94c3d9bac0 Fix default for loading games file ps4 (#36592) 2020-06-09 12:39:08 -07:00
Bas Nijholt
fb7af0384f bump aiokef to 0.2.10 (#36574)
0.2.9 generated a lot of calls on the event loop.
2020-06-09 12:39:07 -07:00
Donnie
5a9a95abe4 Fix nanoleaf incorrect effect update (#36517) 2020-06-09 12:39:06 -07:00
Paulus Schoutsen
e1ad108b6d Merge remote-tracking branch 'origin/master' into rc 2020-06-09 12:38:49 -07:00
Paulus Schoutsen
a76620b76f Merge pull request #36607 from home-assistant/110.7 2020-06-09 12:10:20 -07:00
mreiling
1169ac568b Change nx584 SCAN_INTERVAL to 10 seconds (#36581) 2020-06-09 21:02:08 +02:00
Donnie
1ab1503641 Fix nanoleaf incorrect effect update (#36517) 2020-06-09 11:26:37 -07:00
Paulus Schoutsen
13fd80affa Bumped version to 0.110.7 2020-06-09 11:07:32 -07:00
Franck Nijhof
d576749530 Fix mobile_app missing state in sensor registration (#36604) 2020-06-09 11:07:27 -07:00
Franck Nijhof
2abd3844cf Fix mobile_app missing state in sensor registration (#36604) 2020-06-09 11:06:52 -07:00
Franck Nijhof
854bdfb6f2 Upgrade pre-commit to 2.5.0 (#36596) 2020-06-09 18:44:22 +02:00
mreiling
5f8dcd45c1 Add NX584 alarm binary_sensor zone_number attribute (#36552) 2020-06-09 14:19:46 +02:00
Felipe Martins Diel
38bb8ef4d2 Clean up command learning in the Broadlink integration (#36318) 2020-06-09 14:15:46 +02:00
Paulus Schoutsen
7cc3102209 Fix default for loading games file ps4 (#36592) 2020-06-09 10:23:26 +02:00
Johan Henkens
525e220395 Remove EU code from honeywell integration (#36456) 2020-06-09 09:24:47 +02:00
HomeAssistant Azure
140fd5adaf [ci skip] Translation update 2020-06-09 00:05:22 +00:00
Ian
5b2bf8fd17 Add status_light to Sonos set_option service (#35515) 2020-06-08 23:41:12 +02:00
Bas Nijholt
5e2de4531f bump aiokef to 0.2.10 (#36574)
0.2.9 generated a lot of calls on the event loop.
2020-06-08 14:05:55 -07:00
Paulus Schoutsen
111a00aeeb Bumped version to 0.111.0b4 2020-06-08 12:28:53 -07:00
Franck Nijhof
b3d5717df8 Fix mobile_app sensor re-registration handling (#36567) 2020-06-08 12:27:12 -07:00
Paulus Schoutsen
a84378bb79 Mobile app fixes (#36559) 2020-06-08 12:27:11 -07:00
shbatm
53ba45cc8f Add Z-Wave Notification Sensor support to ISY994 (#36548) 2020-06-08 12:27:10 -07:00
Jörg Thalheim
5d77eb1839 Fix intent component initialisation (#36064)
The intent component expect this method from every module that is called intent.
Fixes #35522
2020-06-08 12:27:09 -07:00
Paulus Schoutsen
c33edbe5bb Use TestCase.addCleanup (#36560) 2020-06-08 12:26:40 -07:00
Franck Nijhof
85ba29012f Fix mobile_app sensor re-registration handling (#36567) 2020-06-08 21:11:37 +02:00
Paulus Schoutsen
517159dc4e Merge remote-tracking branch 'origin/master' into rc 2020-06-08 11:17:27 -07:00
Paulus Schoutsen
a9287b7117 Merge pull request #36579 from home-assistant/110.6 2020-06-08 11:15:35 -07:00
StevusPrimus
5975ec340b Add service select scene to Yamaha Hifi media player (#36564)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-08 19:31:58 +02:00
Paulus Schoutsen
3adfb86a19 Mobile app fixes (#36559) 2020-06-08 10:20:25 -07:00
Paulus Schoutsen
0b7bcc87df Bumped version to 0.110.6 2020-06-08 10:14:45 -07:00
Franck Nijhof
482661f82c Fix mobile_app registering/update sensor values with an unknown state (#36566) 2020-06-08 10:14:40 -07:00
Franck Nijhof
b3cbce3566 Fix mobile_app registering/update sensor values with an unknown state (#36566) 2020-06-08 10:07:05 -07:00
ehendrix23
7a2820ded9 Update aioharmony to include support for XMPP connectivity to Hub (#36485)
* Update aioharmony to 0.2.3

* Update aioharmony to 0.2.4
2020-06-08 09:55:05 -05:00
Giel Janssens
af4fb03230 Sonos queue (#35817)
* Add playbase as a model

* Sonos queue

* Match counting of the queue with service play_queue

* Add service remove_from_queue

* Change description of remove_from_queue

* Use ATTR_QUEUE_POSITION instead of ATTR_CURRENT_QUEUE_POSITION

* Removed queue and show queue_position only when playing local

* Add property queue_position

* Return None instead of -1

* Change docstring from -1 to None
2020-06-08 16:37:35 +02:00
mreiling
a5da21a426 Add services to bypass and unbypass zones on NX584 (#36401)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-08 15:55:50 +02:00
z00nx 0
16e36dca97 Updated tesla-powerwall to 0.2.11 (#36568) 2020-06-08 08:48:58 -05:00
Jonas Thuresson
f522c6c8c7 Add Xiaomi miio vaccum goto service (#35737)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-08 14:57:47 +02:00
Alexei Chetroi
1bdbe90d2a Prevent double ZHA channel initialization (#36554)
* Preven double channel initialization.

* Use a setter for setting ZHA device availability.
2020-06-08 08:54:52 -04:00
eyager1
8ed1b1782e Change logging of successful scans to debug priority (#36538) 2020-06-08 11:30:36 +02:00
Markus Bong
31dd06bd12 Improve devolo Home Control (#36557) 2020-06-08 09:29:09 +02:00
Eugene Prystupa
de7bbd3e24 Add plum_lightpad unique ids (#36549) 2020-06-07 21:52:03 -07:00
Jörg Thalheim
fbbc681ad4 Fix intent component initialisation (#36064)
The intent component expect this method from every module that is called intent.
Fixes #35522
2020-06-07 20:45:34 -07:00
shbatm
9e7f516d07 Add Z-Wave Notification Sensor support to ISY994 (#36548) 2020-06-07 20:00:53 -05:00
Hedda
066784c88f Update ZHA config flow Zigbee radio description (#35607)
* Update ZHA config flow Zigbee radio description
Update ZHA config flow Zigbee radio descriptions to match docs https://github.com/home-assistant/home-assistant.io/pull/13437

* Make protocol plus model names more readable for end-users
* Update homeassistant/components/zha/core/const.py
Co-authored-by: Alexei Chetroi <lexoid@gmail.com>

* Update homeassistant/components/zha/core/const.py
Co-authored-by: Alexei Chetroi <lexoid@gmail.com>

* Update homeassistant/components/zha/core/const.py
Co-authored-by: Alexei Chetroi <lexoid@gmail.com>

* Zigbee radio description simplified and examples  listed in alphabetical order
2020-06-07 20:42:23 -04:00
Paulus Schoutsen
865d65c380 Bumped version to 0.111.0b3 2020-06-07 17:24:48 -07:00
Franck Nijhof
609d202c4d Fix WLED power and brightness with WLED 0.10+ (#36529) 2020-06-07 17:24:43 -07:00
matgad
e43a0087e4 Bump version zigpy-cc (#36506) 2020-06-07 17:24:43 -07:00
Paulus Schoutsen
b9bc147339 Update netdisco (#36499) 2020-06-07 17:24:42 -07:00
Bram Kragten
dd3b0df22d Update frontend to 20200603.2 (#36494) 2020-06-07 17:24:41 -07:00
Erik Montnemery
c987ca735e Bump pychromecast to 6.0.0 (#36414)
* Revert "Prevent race in pychromecast.start_discovery (#36350)"

This reverts commit 391983a0cf.

* Adapt to pychromecast 6.0.0
2020-06-07 17:24:40 -07:00
HomeAssistant Azure
81355a0e23 [ci skip] Translation update 2020-06-08 00:02:43 +00:00
Franck Nijhof
215c7e0e14 Fix WLED power and brightness with WLED 0.10+ (#36529) 2020-06-07 23:37:58 +02:00
Markus Ressel
233284056a Upgrade XS1 component to xs1-api-client v3.0.0 (#36500) 2020-06-07 23:18:47 +02:00
Jens Østergaard Nielsen
56c69d9a25 Update ihcsdk to 2.7.0 (#36527) 2020-06-07 19:47:21 +02:00
Erik Montnemery
35cd6b9abf Remove unused parameter for MQTT discovery (#36526)
* Remove unused parameter for MQTT discovery

* Fix tests
2020-06-07 19:35:35 +02:00
Jeff Irion
823f27db5a Fix usage of states 'idle' and 'standby' for Android TV (#36509) 2020-06-07 10:10:20 -05:00
definitio
ad5101c5c0 Set state for MQTT entities to 'unavailable' when no connection to broker (#36479)
* Report 'unavailable' state when not connected

to MQTT broker

* Fix tests

* Rewrite to remove the polling

* Add tests

* Add some fixes
2020-06-07 09:21:16 +02:00
HomeAssistant Azure
3bf389639b [ci skip] Translation update 2020-06-07 00:03:28 +00:00
Joakim Plate
31973de2d5 Arcam config flow (#34384)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-06-06 13:43:28 -07:00
Josef Schlehofer
524b48be7d Upgrade youtube_dl to version 2020.06.06 (#36493) 2020-06-06 21:35:37 +02:00
Ville Skyttä
0c5ca3084e Add and fix type hints (#36501)
* Fix exceptions.Unauthorized.permission type

* Use auth.permission consts more

* Auth typing improvements

* Helpers typing improvements

* Calculate self.state only once
2020-06-06 20:34:56 +02:00
Paulus Schoutsen
49747684a0 Update netdisco (#36499) 2020-06-06 19:02:39 +02:00
Markus Bong
3495932eb0 Add devolo binary_sensor devices (#36370)
* initial commit

* small corrections

* fix linting error

* add new files to coveragerc

* rename devolo_sensor to devolo_device

* use correct import

* use binary_switch platform

* use binary_switch platform

* add binary_sensor to coverage

* adjustments according PR review

* make super call easier to read

* use f-string instead of concatenating

* update docstrings - remove device_id property

* add will_remove_from_hass
2020-06-06 10:10:05 -05:00
Tim van Cann
d73a4e1ed5 Add Avri config flow (#34288)
* Add config flow to Avri integration

* Add config flow validation

* Update .coveragerc

* Start adding config flow tests

* Fix failing test

* Fix pylint

* Update homeassistant/components/avri/config_flow.py

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

* Update homeassistant/components/avri/config_flow.py

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

* Fix import order

* Code review comments

* Update homeassistant/components/avri/sensor.py

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

* Remove device information

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-06-06 09:37:31 -05:00
matgad
14f5cab71d Bump version zigpy-cc (#36506) 2020-06-06 15:32:26 +02:00
Bram Kragten
29ab1935cb Update frontend to 20200603.2 (#36494) 2020-06-05 21:58:26 -07:00
Thomas Lovén
bdc098645b Add entity list to light and cover group attributes (#36477)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-06-05 21:23:52 -07:00
HomeAssistant Azure
492874c4a0 [ci skip] Translation update 2020-06-06 00:03:33 +00:00
Paulus Schoutsen
4b1761ccb5 Use builtin mock (#36473) 2020-06-05 15:12:50 -07:00
Paulus Schoutsen
76b5017df1 Merge remote-tracking branch 'origin/master' into rc 2020-06-05 14:34:55 -07:00
Paulus Schoutsen
401b0dce68 Bumped version to 0.111.0b2 2020-06-05 14:34:22 -07:00
Franck Nijhof
7520aa5b25 Fix iOS app crashing on None values in Zeroconf service info (#36490) 2020-06-05 14:34:12 -07:00
Alexei Chetroi
85ee0a1a3a Process events from ZHA Window Covering Remote (#36489) 2020-06-05 14:34:11 -07:00
jrester
a1b2dcc5a8 Update tesla-powerwall to 0.2.10 (#36486)
modified:   homeassistant/components/powerwall/manifest.json
	modified:   requirements_all.txt
	modified:   requirements_test_all.txt
2020-06-05 14:34:10 -07:00
J. Nick Koston
d1c083eed9 Upgrade pysonos to 0.0.31 (#36483) 2020-06-05 14:34:10 -07:00
Lindsay Ward
33ec314091 Fix yeelight_sunflower hs_color using RGB values (#36470) 2020-06-05 14:34:09 -07:00
J. Nick Koston
1646113b69 Update myq for latest api changes (#36469) 2020-06-05 14:34:08 -07:00
Paulus Schoutsen
1831b3bfb7 Bump hass-nabucasa to 0.34.5 (#36461) 2020-06-05 14:34:07 -07:00
shbatm
e053f75a08 Fix error on empty UOM for ISY994 Climate Device (#36454) 2020-06-05 14:34:07 -07:00
J. Nick Koston
ca511cb06c Upgrade zeroconf to 0.27.1 (#36277) 2020-06-05 14:34:06 -07:00
J. Nick Koston
5e65d8d3c3 Upgrade zeroconf to 0.27.1 (#36277) 2020-06-05 14:33:26 -07:00
Alexei Chetroi
1c329ff708 Process events from ZHA Window Covering Remote (#36489) 2020-06-05 14:11:46 -07:00
Paulus Schoutsen
cdf4588fb0 Merge pull request #36492 from home-assistant/0.110.5 2020-06-05 14:08:03 -07:00
J. Nick Koston
2cf987bfc2 Update myq for latest api changes (#36469) 2020-06-05 13:07:36 -07:00
jrester
e807274d7e Update tesla-powerwall to 0.2.10 (#36486)
modified:   homeassistant/components/powerwall/manifest.json
	modified:   requirements_all.txt
	modified:   requirements_test_all.txt
2020-06-05 15:03:17 -05:00
Paulus Schoutsen
3cdcd5d223 Bumped version to 0.110.5 2020-06-05 12:44:11 -07:00
Franck Nijhof
882359d784 Fix iOS app crashing on None values in Zeroconf service info (#36490) 2020-06-05 12:44:08 -07:00
Franck Nijhof
4950cbee1c Fix iOS app crashing on None values in Zeroconf service info (#36490) 2020-06-05 12:43:58 -07:00
Paulus Schoutsen
0a779ac64c Add partial mobile app sensor validation (#36433) 2020-06-05 12:43:18 -07:00
Anton Tolchanov
0bf64e9a2c Add @knyar as a codeowner for prometheus integration (#36487) 2020-06-05 21:29:06 +02:00
Alexey Kustov
3076fc5f25 Add notify_events notify integration (#36049)
* Add new notify_events notification component

* Fix manifest

* Formatting fix

* Black formatting + CODEOWNERS

* Fix requirements_all.txt

* Flake8 warning fix

* Isort fixes

* Update notify-events library requirement version

* Replace Exception to more suitable and update lib version

* Reformat integration according to "0007-integration-config-yaml-structure.md"

* Update homeassistant/components/notify_events/manifest.json

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

* Fix manifest + remove async

* Black formatting

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-05 21:26:56 +02:00
Aaron Bach
b51d81edba Clean up Tile refactor (#36450)
* Clean up Tile refactor

* Code review
2020-06-05 21:12:48 +02:00
Paulus Schoutsen
6faf9e8bbe panel_custom: Allow ES5+latest build, deprecate html (#36464)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-05 10:39:18 -07:00
J. Nick Koston
c0307dca3a Upgrade pysonos to 0.0.31 (#36483) 2020-06-05 10:30:20 -07:00
J. Nick Koston
5b94807923 Update myq for latest api changes (#36469) 2020-06-05 10:29:09 -07:00
Paulus Schoutsen
4170eb0f83 Use builtin mock (#36473) 2020-06-05 10:59:55 +02:00
Paulus Schoutsen
874c8fea03 Bump hass-nabucasa to 0.34.5 (#36461) 2020-06-05 00:11:40 -07:00
Lindsay Ward
a4204b440c Fix yeelight_sunflower hs_color using RGB values (#36470) 2020-06-05 08:40:50 +02:00
HomeAssistant Azure
f8e48a9230 [ci skip] Translation update 2020-06-05 00:05:36 +00:00
shbatm
04231bcb54 Fix error on empty UOM for ISY994 Climate Device (#36454) 2020-06-05 00:22:35 +02:00
Erik Montnemery
f170c80bea Bump pychromecast to 6.0.0 (#36414)
* Revert "Prevent race in pychromecast.start_discovery (#36350)"

This reverts commit 391983a0cf.

* Adapt to pychromecast 6.0.0
2020-06-04 20:32:00 +02:00
Paulus Schoutsen
0840092b29 Bumped version to 0.111.0b1 2020-06-04 10:02:49 -07:00
Paulus Schoutsen
36207e56b9 Fix invalid device info for Daikin devices (#36448) 2020-06-04 10:02:42 -07:00
J. Nick Koston
1b5a601417 Ensure verbose logging flag is respected. (#36444) 2020-06-04 10:02:41 -07:00
Paulus Schoutsen
c7da4d77ce Add partial mobile app sensor validation (#36433) 2020-06-04 10:02:40 -07:00
Robert Svensson
84bd2067e4 Fix deCONZ groups don't report ctmax/min (#36432)
* Groups don't report ctmax/min
2020-06-04 10:02:39 -07:00
Chris Talkington
4cd04e3f99 Update sonarr to 0.2.2 (#36429) 2020-06-04 10:02:39 -07:00
Chris Talkington
3aa4bb5469 Add roku exception handling for service calls (#36328) 2020-06-04 10:02:38 -07:00
Paulus Schoutsen
2c49311ee4 Guard blowing up converting 0 mired/kelvin (#35486) 2020-06-04 10:02:37 -07:00
Paulus Schoutsen
394f16987d Fix invalid device info for Daikin devices (#36448) 2020-06-04 10:00:31 -07:00
Chris Talkington
f06c0a8b54 Add roku exception handling for service calls (#36328) 2020-06-04 09:59:39 -07:00
J. Nick Koston
36b157b85a Ensure verbose logging flag is respected. (#36444) 2020-06-04 09:51:06 -07:00
Aaron Bach
7a3c2e1f6c Add config flow for Tile (#36173)
* Overhaul Tile

* Adjust coverage

* Fix tests

* Code review

* Code review

* Remove unused config flow step

* Revert "Remove unused config flow step"

This reverts commit cb206e0446.

* Fix tests
2020-06-04 10:07:27 -06:00
Paulus Schoutsen
fae80621fb Guard blowing up converting 0 mired/kelvin (#35486) 2020-06-04 08:48:39 -07:00
Ziv
1edbdcb67b Fix Dynalite to explicitly check valid device class (#36418)
* changed back to check for class in DEVICE_CLASSES

* created a flow that would go through everything as it was blocking the commit
and the cv rules prevent an input that would get to that flow

* moved DEFAULT_COVER_CLASS from const to cover
2020-06-04 15:34:28 +02:00
Robert Svensson
99318b7b11 Remove Axis option to enable/disable camera (#36420) 2020-06-04 14:25:50 +02:00
Franck Nijhof
a6107198b9 Upgrade numpy to 1.18.5 (#36434) 2020-06-04 14:13:41 +02:00
Tom
203217c175 Add additional sensors to Plugwise integration (#36431) 2020-06-04 10:21:27 +02:00
Paulus Schoutsen
c316735996 Bump lokalise2 2.5.1 (#36430) 2020-06-04 10:17:25 +02:00
Robert Svensson
40829d9d76 Fix deCONZ groups don't report ctmax/min (#36432)
* Groups don't report ctmax/min
2020-06-04 10:15:30 +02:00
Paulus Schoutsen
68b077ffaa Add partial mobile app sensor validation (#36433) 2020-06-04 10:13:01 +02:00
Chris Talkington
8528b4db3a Update sonarr to 0.2.2 (#36429) 2020-06-04 09:39:49 +02:00
Tom
48d1bc7c13 Cleanup and improve Plugwise merges (#36406)
* Remove period from logging messages

* Save indentation using guard clauses

* Typo

* Walk other files

* Rewalk all files

* Not cleanup, but adding indicatd missing measurements

* Revert new sensors
2020-06-04 08:18:46 +02:00
HomeAssistant Azure
08e85696c1 [ci skip] Translation update 2020-06-04 00:04:15 +00:00
Quentame
e08ba6703c Bump python-synology to 0.8.2 (#36410)
* Bump python-synology to 0.8.2

* state_attributes to device_state_attributes

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

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-06-04 00:18:43 +02:00
Franck Nijhof
9ef14efa29 Bumped version to 0.112.0dev0 (#36417) 2020-06-03 22:52:34 +02:00
Ville Skyttä
fc395de511 Upgrade mypy to 0.780 (#36416)
http://mypy-lang.blogspot.com/2020/06/mypy-0780-released.html
2020-06-03 22:51:44 +02:00
Franck Nijhof
ccdf5d13bd Bumped version to 0.111.0b0 2020-06-03 21:21:42 +02:00
J. Nick Koston
751e2f4125 Extend logbook api to be able to fetch a slice of data between two time boundaries. (#35847)
* Create logbook_timeslice api

* add end_datetime

* Add tests

* switch to end_time to match history api
2020-06-03 14:07:56 -05:00
Bas Nijholt
dcb04acc65 Set automation last_triggered earlier (#35671)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-06-03 20:08:37 +02:00
matlimatli
eba5b50e58 Add support for showing text on Keba EV chargers (#36056)
* Add support for showing text on Keba EV chargers

* Changed implementation to use the notify interface

* Removed stale references to set_text

* Clean up

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-03 19:28:02 +02:00
Bram Kragten
d155a67687 Update frontend to 20200603.1 (#36409) 2020-06-03 09:55:41 -07:00
nicx
9871efd52f Add CalDAV upcoming appointments period option (#34584)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-03 09:54:51 -07:00
Andre Lengwenus
2b5bb8dac0 Cover group considers opening and closing states (#36203) 2020-06-03 18:44:04 +02:00
Frederik Gladhorn
1510d5625a Update NAD states only when the device is on (#34809)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-06-03 09:43:44 -07:00
Austin Mroczek
98a056f7a9 Notify user if arming or disarming totalconnect alarm fails (#36085) 2020-06-03 18:38:31 +02:00
Frederik Gladhorn
1186c2c48c Pass config into NAD constructor (#34961)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-03 09:36:59 -07:00
jjlawren
9aac8482d5 Remove deprecated Plex YAML config (#36388) 2020-06-03 09:20:21 -07:00
Emilv2
3b606504a8 Add new is_reatime attribute for De Lijn (#36369) 2020-06-03 09:52:20 -06:00
Jason Hunter
eb95c5cd2e update renew logic to work better with cameras responding with invalid termination times by extending the duration (#36393) 2020-06-03 09:51:57 -06:00
uvjustin
660265fe50 Swap title and album name for streams in forked_daapd (#36381) 2020-06-03 09:51:15 -06:00
Maciej Bieniek
b8f8b6fa50 Fix using the async api from sync context (#36408) 2020-06-03 09:46:42 -06:00
Franck Nijhof
0950ab0dd8 Fix dynamically add/remove WLED strip segments (#36407) 2020-06-03 17:18:50 +02:00
celestinjr
355d655542 Enable handling of 'num_repeats' for itach (#36362) 2020-06-03 09:13:53 -05:00
Bram Kragten
35b95f77e9 Update frontend to 20200603.0 (#36405) 2020-06-03 15:20:01 +02:00
Maciej Bieniek
465b98513b Add config flow to Dune HD (#36345)
* Add config_flow to the dunehd integration

* Add tests

* Run gen_requirements_all

* Fix pylint error

* Better hostname validation

* Build device info in the class
2020-06-03 07:01:56 -05:00
Scotte Zinn
95563e04e8 Allow synology_dsm configuration to specify a host name (#36305)
* Allow configuration to specify a host name.

This will default to "synology", so the sensors would be named
sensor.synology_... which is the original implementation.

By specifying a name, which is required for multiple synology hosts,
you can then have sensor.hostA_... and sensor.hostB_...

* Get the base name for the sensors from the Synology DSM hostname

* Don't need the name for the config

* Added missing import

* Fixed another typo

* Removed definition of unused BASE_NAME

* Removed end of line to revert

* Moved for ordering
2020-06-03 13:01:13 +02:00
Robert Van Gorkom
fcef259021 Prefer use cloud url for oauth2 for Withings (#36348) 2020-06-03 12:40:46 +02:00
Fabian Peter Hammerle
8ccdaf2927 Add huawei_lte sensor for number of unread sms (#35665) 2020-06-03 11:59:06 +02:00
Anton Tolchanov
d14112748c Add a Prometheus metric for HVAC action (#31945) 2020-06-03 11:53:21 +02:00
Tom Harris
37832d5e81 Bump pyinsteon to 1.0.3 (#36398) 2020-06-03 11:52:56 +02:00
Eduard van Valkenburg
5e2b87866e Update azure_event_hub (#31448) 2020-06-03 10:32:14 +02:00
Robert Svensson
a8e7bf6cf7 Axis - bump dependency (#36402) 2020-06-03 10:23:31 +02:00
Jason Hunter
94d8e77f8c Add non-root dev container user (#34984)
* add non-root container user

* fix dockerfile and homeassistant editable install

* just install in home directory

* less impactful default changes

* separate RUN for better layer caching

* use vscode-remote base image
2020-06-03 09:55:25 +02:00
Patrick Kishino
e80fac36d8 Bumped PyAv to 8.0.2 to fix mac os stream issue (#36396) 2020-06-03 08:00:50 +02:00
Diefferson Koderer Môro
0e2e39a5f2 Fix Method GetNetworkInterfaces not implemented (#36243) 2020-06-02 19:45:20 -07:00
Felipe Martins Diel
a7a58b9eac Fix SP2-CL (0x7544) sensor update (#36242)
* Fix SP2-CL (0x7544) sensor update

This device does not support get_energy(). We need to ignore the CommandNotSupportedError in the update method.

* Format with Black

* Only wrap code that throws with catch

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-06-02 19:44:45 -07:00
rajlaud
8cd640867c Update pysqueezebox to 0.2.1 (#35956) 2020-06-02 20:31:44 -05:00
willscottuk
209f9a812e Fix Canary entries API removal (#36218) 2020-06-02 18:22:39 -07:00
Vincent Le Bourlot
7e2872bab3 Add more tahoma sensors (#36256) 2020-06-02 18:17:55 -07:00
Tom Harris
b5f12bd9c1 Add climate platform to Insteon (#35763) 2020-06-02 18:16:44 -07:00
J.P. Hutchins
544094af21 Suppress error for start_torrents toggle (#35799) 2020-06-02 18:13:15 -07:00
Boris Kaplounovsky
2f6ffe7068 Fix json overwriting if you have >1 PS4 connected (#35778) 2020-06-02 17:55:55 -07:00
Markus Bong
e94228fddf Use show_advanced_options in devolo home control (#35360) 2020-06-02 17:52:36 -07:00
fb22
a5d520b603 Add llamalab_automate optional message delivery priority (#34234)
* Add optional message delivery priority

* Sort components.notify import

* Sort components.notify import
2020-06-02 17:32:08 -07:00
Franck Nijhof
d2e6b863b7 Upgrade wled 0.4.1 (#36091) 2020-06-03 02:29:49 +02:00
Kevin Fronczak
94a9b364b0 Move Blink trigger_camera service to camera platform (#35635) 2020-06-02 17:25:12 -07:00
HomeAssistant Azure
763ab79e6c [ci skip] Translation update 2020-06-03 00:03:00 +00:00
Sean Leonard
69531593f2 Sort minecraft_server players_online sensor's players_list (#35280)
Sort the players_list attribute of the minecraft_server players_online sensor in order to eliminate uneccessary state updates and ease comparisons in state changes.
2020-06-03 02:01:16 +02:00
J. Nick Koston
eedbb86b67 Fix flapping buienradar tests (#36394) 2020-06-02 18:54:58 -05:00
baurandr
5ba610859d Fix exception in callback async_remove_from_mem (#34075)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-02 16:46:17 -07:00
jjlawren
4180106125 Bump plexapi to 4.0.0 (#36389) 2020-06-02 18:38:24 -05:00
Aaron Godfrey
e347f3770c Use SCAN_INTERVAL instead of Throttle to allow manual todoist updates (#35297) 2020-06-03 01:37:41 +02:00
Brynley McDonald
5d6a563ac7 Implement Google Assistant media traits (#35803)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-06-02 16:20:59 -07:00
Konstantin Antselovich
f94bbdab61 Disable jemalloc via specific ENV variable, see Issue#36237 (#36274) 2020-06-03 01:08:50 +02:00
J. Nick Koston
5f4fdaa171 Remove zeroconf options from homekit (#35687)
* Remove zeroconf options from homekit

homekit uses the system shared zeroconf instance which
made the interface choice option controlled by the
zeroconf integration setting.

* change to cv.deprecated

* adj

* fix remaining tests from original merge conflict

* remove invalidation_version
2020-06-02 17:47:39 -05:00
Vincent Le Bourlot
bfc5aa90b1 Add support for rts LightRTSComponent switch. (#36249) 2020-06-02 17:44:36 -05:00
jjlawren
44d7169642 Fix flaky Plex test (#36391) 2020-06-02 17:37:10 -05:00
J. Nick Koston
00387bf870 Make the frontend available sooner (Part 2 of 2) (#36264)
* Part 1 of 2 (no breaking changes in part 1).

When integrations configured via the UI block startup or fail to start,
the webserver can remain offline which make it is impossible
to recover without manually changing files in
.storage since the UI is not available.

This change is the foundation that part 2 will build on
and enable a listener to start the webserver when the frontend
is finished loading.

Frontend Changes (home-assistant/frontend#6068)

* Part 1 of 2 (no breaking changes in part 1).

When integrations configured via the UI block startup or fail to start,
the webserver can remain offline which make it is impossible
to recover without manually changing files in
.storage since the UI is not available.

This change is the foundation that part 2 will build on
and enable a listener to start the webserver when the frontend
is finished loading.

Frontend Changes (home-assistant/frontend#6068)

* Part 2 of 2 (breaking changes in part 2).

When integrations configured via the UI block startup or fail to start,
the webserver can remain offline which make it is impossible
to recover without manually changing files in
.storage since the UI is not available.

This change is the foundation that part 2 will build on
and enable a listener to start the webserver when the frontend
is finished loading.

* bump timeout to 1800s, adjust comment

* bump timeout to 1800s, adjust comment

* bump timeout to 4h

* bump timeout to 4h

* remove timeout failsafe

* remove timeout failsafe

* and the test

* and the test

* find the test that needs mocking

* find the test that needs mocking

* Revert "find the test that needs mocking"

This reverts commit 064e7787a8e9bc65df965530726fa1c41f8bcd36.

* Revert "find the test that needs mocking"

This reverts commit 064e7787a8e9bc65df965530726fa1c41f8bcd36.

* fix the one that was missed due to the conflict
2020-06-02 17:02:09 -05:00
Franck Nijhof
5cf93e3639 Merge branch 'master' into dev 2020-06-02 23:16:36 +02:00
Martin Weinelt
acfd907c50 Expose switch attributes in Prometheus component (#35216) 2020-06-02 22:47:49 +02:00
Tom
61c08e792d Update plugwise to async and config_flow switch part (#36383)
* Add switch component

* Update homeassistant/components/plugwise/switch.py

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

* Update homeassistant/components/plugwise/switch.py

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

* Improvements by @bdraco

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-06-02 14:45:14 -05:00
Franck Nijhof
1771fbbd34 Upgrade pytest to 5.4.3 (#36385) 2020-06-02 21:26:31 +02:00
Erik Montnemery
7722e417ad Stable device id when a deleted device is restored (#36309)
* Stable device id when a deleted device is restored.

* Tweak

* Store only basic data for deleted devices

* Simplify code

* Simplify code

* Address review comments.

* Improve test

* Fix missing save
2020-06-02 21:22:08 +02:00
J. Nick Koston
578d4a9b6a Make the frontend available sooner (Part 1 of 2) (#36263)
* Part 1 of 2 (no breaking changes in part 1).

When integrations configured via the UI block startup or fail to start,
the webserver can remain offline which make it is impossible
to recover without manually changing files in
.storage since the UI is not available.

This change is the foundation that part 2 will build on
and enable a listener to start the webserver when the frontend
is finished loading.

Frontend Changes (home-assistant/frontend#6068)

* Address review comments

* bump timeout to 1800s, adjust comment

* bump timeout to 4h

* remove timeout failsafe

* and the test
2020-06-02 13:54:11 -05:00
Marius
7338feb659 Add device_class to Stookalert (#34638)
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2020-06-02 20:27:41 +02:00
Robert Svensson
770b622a6e Axis - Add device class property to binary sensors (#36384)
* Add device class property to binary sensors

* Update tests
2020-06-02 20:12:19 +02:00
Martin Hjelmare
db8d4053d6 Add supervisor get addon info helper (#36260) 2020-06-02 11:11:23 -07:00
Franck Nijhof
08566f84cd Remove wunderlist, platform is decommissioned (#36380) 2020-06-02 19:37:52 +02:00
András Rutkai
dfc3a24522 Update list of voices in Watson TTS service (#36377)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2020-06-02 19:11:33 +02:00
Tom
c68e0a1d46 Update plugwise to async and config_flow binary_sensor part (#36378)
* Add binary_sensor component

* Version bump

* Blushing commit - tnx @bdraco
2020-06-02 11:30:00 -05:00
Quentame
26cbca101a Refactor Synology entries to allow not fetching the API when it's disabled + add security binary sensor (#35565)
- add Synology DSM Security binary sensor (enabled by default)
- use device name instead of id in names
- add device type to name
- show disk manufacturer, model and firmware version in devices
- some entries are disabled by default (`entity_registry_enabled_default`)
- binary sensor + sensor uses `device_class` when possible
- do not fetch a concerned API if all entries of it are disabled
- entity unique_id now uses key instead of label
- entity entity_id changes for disk and volume: example from `sensor.synology_status_sda` to `sensor.synology_drive_1_status`, or from `sensor.synology_average_disk_temp_volume_1` to `sensor.synology_volume_1_average_disk_temp`
- now binary sensor:
  - disk_exceed_bad_sector_thr
  - disk_below_remain_life_thr
- removed sensor:
  - volume type (RAID, SHR ...)
  - disk name (Drive [X])
  - disk device (/dev/sd[Y])
2020-06-02 18:22:51 +02:00
J. Nick Koston
5d780ded29 Fix flapping aiohttp_client test (#36379) 2020-06-02 10:54:13 -05:00
Franck Nijhof
e86bedb223 Prevent possible secret values to show up in deprecation logs (#36368)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-02 17:29:59 +02:00
Robert Svensson
37f7d262d7 Change deCONZ sensor device classes (#36352)
* Change vibration type to vibration instead of motion

* Also replace icon and unit of measurement
2020-06-02 16:17:21 +02:00
uvjustin
bde94d187c Bump pyforked-daapd version to 0.1.10 (#36333) 2020-06-02 14:26:25 +02:00
Fredrik Erlandsson
da6a99b333 Re-add connections to Daikin's device_info (#36340)
* Re-add connections to device_info

* Fix typo in identifiers

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-02 13:24:15 +02:00
Franck Nijhof
0629b30ade Correct inst method names in system info, add Docker version (#36360) 2020-06-02 10:50:34 +02:00
Robert Svensson
a3865fb383 UniFi - Increase time to mark UniFi devices as away (#36366) 2020-06-02 10:35:27 +02:00
Aaron Bach
cc4326276e RainMachine: Add time remaining as a zone attribute (#36361) 2020-06-01 21:49:02 -06:00
Franck Nijhof
e6fe34e64d Migrate automation to use describe_event for logbook (#36356) 2020-06-01 17:18:40 -07:00
HomeAssistant Azure
a4d4e26fe5 [ci skip] Translation update 2020-06-02 00:05:54 +00:00
Paulus Schoutsen
2b42d77f58 Fix flaky media player test (#36358) 2020-06-01 18:19:12 -05:00
Robert Svensson
a6e9a312a3 deCONZ - Don't send off signals to light if already off (#36357) 2020-06-02 00:20:52 +02:00
Franck Nijhof
1883b1d2a2 Add config reloaded events for automation and scene (#34664) 2020-06-01 15:19:00 -07:00
Robert Svensson
07469127ce deCONZ - Add support for max/min mireds (#36355)
* Add support for max/min mireds reported per light from deconz .77

* Bump dependency
2020-06-01 23:48:18 +02:00
Erik Montnemery
391983a0cf Prevent race in pychromecast.start_discovery (#36350)
* Workaround for race in pychromecast

* Fix tests
2020-06-01 23:25:06 +02:00
Paulus Schoutsen
acbffb511d Fix base_url extract stack (#36331)
* Fix base_url extract stack

* Fix tests
2020-06-01 11:44:45 -07:00
Robert Svensson
cf6043fc2d Support Axis stream profile and configuring it through options flow (#36322)
* Support stream profile and configuring it through options flow

* Options flow test

* Allow configuration of not using a stream profile

* Shorten default stream profile string
2020-06-01 18:45:38 +02:00
Brynley McDonald
47706dac1a Implement google_assistant ModesTrait for input_select (#36313) 2020-06-01 09:40:47 -07:00
Lindsay Ward
a333417ddf Add only unique_id property to yeelightsunflower, not other changes (#36311) 2020-06-01 11:36:43 -05:00
Franck Nijhof
e5d81aeb2a Remove gearbest integration (ADR-0004) (#36347) 2020-06-01 17:43:20 +02:00
J. Nick Koston
1c663dc179 Mark homekit accessories unavailable if the underlying entity is unavailable (#35685)
* Mark homekit accessories unavailable if the underlying entity is unavailable.

* bump pyhap to 2.9.0

* bump hap

* Update homeassistant/components/homekit/accessories.py

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

Co-authored-by: Franck Nijhof <git@frenck.dev>
2020-06-01 10:11:48 -05:00
J. Nick Koston
141c4c2f33 Fix various flapping tests that are missing block_till_done (#36346)
* Add missing async_block_till_done to various tests

* Add missing async_block_till_done to various tests
2020-06-01 10:11:09 -05:00
Alexei Chetroi
dcbe2136cf Fix ZHA electrical measurement sensor (#36327) 2020-06-01 09:24:56 -04:00
Fredrik Erlandsson
e4aca9d73c Version bump pydaikin to 2.1.1 (#36341) 2020-06-01 14:52:51 +02:00
Luke Pomfrey
5827a26dfc Fix handling of min_size argument in OpenCV component (#36335)
The OpenCV image_processing component accepts a `min_size` argument in
each classifier that is then passed into the OpenCV library. The
`min_size` argument is expected to be a tuple of 2 ints, and is entered
into the platofrm schema as such. However, yaml will always produce a
list instead of a tuple, which means in practice it's impossible to use
the `min_size` argument. This changes the schema to accepts any sequence
of 2 ints that is then coerced into a tuple suitable for passing to the
OpenCV library.
2020-06-01 14:15:01 +02:00
Wim Haanstra
aa1b32ad36 Add new DSMR Reader fields that were added to MQTT (#36337) 2020-06-01 14:10:09 +02:00
Tom
d0fedad000 Update plugwise to async and config_flow sensor part (#36219)
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-06-01 14:01:17 +02:00
Florent Thoumie
5d7720832b Bump iaqualink to 0.3.4 (#36317) 2020-06-01 12:20:46 +02:00
Alan Tse
7da15378b1 Bump teslajsonpy to 0.8.1 (#36323) 2020-06-01 12:13:11 +02:00
Paulus Schoutsen
691ec21ba4 Mark min version of httplib2 (#36330) 2020-06-01 09:44:18 +02:00
Paulus Schoutsen
e30893ed80 Add block_till_done to buienradar test (#36332) 2020-06-01 00:24:16 -07:00
Paulus Schoutsen
276f3afb00 Do async_setup_platform in background (#36244)
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-31 22:18:30 -07:00
HomeAssistant Azure
d488c779fc [ci skip] Translation update 2020-06-01 00:03:28 +00:00
Robert Svensson
01d9366299 Improve Axis integration (#36205)
* Improve configuration

* Read new properties for basic device information
Improve tests by mocking less improving stability of tests

* Clean up in device tests

* Support new port management api

* Improve initializing data

* Bump dependency to v28
2020-05-31 20:00:15 +02:00
Igor
6ed68d8ced Do not show graphite warnings if no new_state in event (#36292)
It is not correct to show warning about "unexpected event type" if EVENT_STATE_CHANGED have no new_state field.
We should show this warning only if it is real unexpected event type.
Run task_done() before continue, because we should tell the queue that the processing on the task is complete
  after get().
2020-05-31 19:58:02 +02:00
Brian Rogers
7197ef76a6 Add Rachio rain sensor status (#36229)
* Add Rachio rain sensor status

* Remove summary

* Fix and re-add zone webhook summary

* Add slope to const
2020-05-31 10:26:56 -05:00
Emilv2
0ae23fa166 Remove duplicate information in delijn sensor (#36276) 2020-05-31 10:02:56 -05:00
Raman Gupta
cd054a9579 clean up code to improve consistency and revert previous change (#35752) 2020-05-31 10:03:11 +02:00
Paulus Schoutsen
2a86d52dba Alexa media player only include equalizer if supported sound mode (#36285) 2020-05-30 21:42:40 -07:00
HomeAssistant Azure
5920f3379c [ci skip] Translation update 2020-05-31 00:02:42 +00:00
Kumar Gala
39f2d4cb5a Add unique_id support to Somfy MyLink (#36232) 2020-05-31 00:48:38 +02:00
J. Nick Koston
db9900cf50 Reduce hunterdouglas_powerview parallel updates (#36299)
The powerview hub gets overwhelmed with just a
few requests so we now set PARALLEL_UPDATES to
1.
2020-05-30 17:37:25 -05:00
Tom Harris
fb754186bd Bump pyinsteon to 1.0.2 (#36297) 2020-05-30 21:08:36 +02:00
Luke Pomfrey
a062da05b4 Keep all OpenCV classifier results (#36294) 2020-05-30 20:17:15 +02:00
Raman Gupta
22a1452946 Bump pyvizio version to 0.1.48 (#36275) 2020-05-30 20:07:56 +02:00
Quentame
1855c91988 Use CONF_CLIENT_ID & CONF_CLIENT_SECRET from homeassistant.const (#36233)
* Use CONF_CLIENT_ID & CONF_CLIENT_SECRET from homeassistant.const

* Fix pylint

* Use in tests

* Search for "client_id"

* Fix tests

* Fix test

* Fix test
2020-05-30 17:27:20 +02:00
Barry Williams
b6407f77da Add service to openhome to invoke a pin (#31119)
Setup platform async
Use entity services
Store UUID in default data rather than entity
2020-05-30 14:40:35 +02:00
Fredrik Erlandsson
efec62d98e Add KEY_HOSTNAME for Daikin zeroconf (#36253)
* Add KEY_HOSTNAME for Daikin zeroconf

* Update tests and use CONF_HOST as hostname
2020-05-30 09:50:18 +02:00
mlemainque
e1c6f01047 Fix reworded properties in 2.1.0 pydaikin release (#36257) 2020-05-29 22:15:54 -04:00
Paulus Schoutsen
86582ad1ba Fix lint on sonarr 2020-05-29 17:32:14 -07:00
Chris Talkington
940249f45e Refactor Sonarr Integration (#33859)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-05-29 17:08:05 -07:00
HomeAssistant Azure
f4a518edcc [ci skip] Translation update 2020-05-30 00:03:23 +00:00
J. Nick Koston
fa00f3e49b s/hass.loop.create_task/asyncio.create_task/g (#36262) 2020-05-29 17:13:58 -05:00
foxy82
67f7a4bb57 Add more alexa doorbell event locales (#36252) 2020-05-29 14:39:17 -07:00
Paulus Schoutsen
35c00fed6d Migrate translations upload to use Lokalise CLI 2 (#36247) 2020-05-29 11:43:48 -07:00
jjlawren
ff9de687c0 Bump plexwebsocket to 0.0.10 (#36226) 2020-05-29 13:24:35 +02:00
Tom Brien
26fae7c629 Fix weather entity copy and paste error (#36227) 2020-05-29 12:51:43 +02:00
Pascal Vizeli
ed014e3c96 Revert "Ensure frontend is available if integrations fail to start - Part 1 of 2 (#36093)" (#36251)
This reverts commit fbe7b4ddfa.
2020-05-29 10:18:39 +02:00
Markus Bong
08f2714e57 Change devolo HomeControl SwitchDevice to SwitchEntity (#36248) 2020-05-29 09:59:44 +02:00
Josef Schlehofer
6f9770c067 Upgrade youtube_dl to version 2020.05.29 (#36239) 2020-05-29 09:16:35 +02:00
Daniel Høyer Iversen
dcea238661 Fix some mistakes in documentation (#36246) 2020-05-28 23:00:20 -07:00
J. Nick Koston
fbe7b4ddfa Ensure frontend is available if integrations fail to start - Part 1 of 2 (#36093)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-05-28 21:09:07 -07:00
Paulus Schoutsen
9c45115468 Upgrade translations download to use Lokalise CLI v2 (#36240) 2020-05-28 21:06:09 -07:00
Paulus Schoutsen
7194b74580 Merge pull request #36238 from home-assistant/rc 2020-05-28 17:17:56 -07:00
HomeAssistant Azure
564fb1d1e5 [ci skip] Translation update 2020-05-29 00:04:16 +00:00
J. Nick Koston
5183c40b23 Periodically log when integrations are taking a while to setup (#36208)
* Periodicly log when intergrations are taking a while to setup

When one or more intergrations are taking a while to setup
it is hard to determine which one is the cause.  We can
help narrow this down for the user with a periodic log
message about which domains are still waiting to be setup
every 30s.

* 30 -> 60 per discussion

* only log when the integration is actually doing setup

* reduce, fix race in test
2020-05-28 18:48:42 -05:00
Fredrik Erlandsson
e1fd14e00a Add support for zeroconf for Daikin (#35769) 2020-05-28 18:30:01 -05:00
gjbadros
f9aff4fc41 Use new elkm1-lib module's LD log data support to correctly identify user_ids (#36211)
* Requires 0.7.18 of elkm1 library to decode LD messages, and uses those messages to reliably set the arming/disarming user when there are more than one area.  See https://github.com/home-assistant/core/issues/35310.

* Fixed typo

* Fixed off by one error -- LD command reports 1-based user-numbers which is the changed_by_id we want, but we need 0-based indices as argument to username.

* Bump required version of elkm1, remove logging message I was using for testing; prepping for PR.

* Black formatted

* Fixed bug whereby I needed to ref elements when running against released build of elkm1-lib
2020-05-28 18:26:03 -05:00
Paulus Schoutsen
b928d5d4b6 Bump hass_nabucasa to 0.34.4 (#36236) 2020-05-28 16:21:58 -07:00
Paulus Schoutsen
33f645aba9 Bumped version to 0.110.4 2020-05-28 15:52:40 -07:00
Erik Montnemery
093d797c3b Correct MQTT device trigger reconfiguration with same topic (#36234) 2020-05-28 15:52:34 -07:00
Erik Montnemery
8426bdc9ae Fix custom position range (#36222) 2020-05-28 15:52:33 -07:00
Aaron Bach
ca0149c635 Prevent AirVisual from polling (#36199)
* Prevent AirVisual from polling

* Docstring
2020-05-28 15:52:32 -07:00
Chris Talkington
e967c93b7b Fix roku select source with app ids (#36191) 2020-05-28 15:52:32 -07:00
Erik Montnemery
3a80cb1d1d Bump zeroconf, pychromecast. Log if zeroconf.get_service_info fails. (#36185) 2020-05-28 15:52:31 -07:00
J. Nick Koston
61d8efae5f Update cast to use shared zeroconf (#35570)
* Update cast to use the shared zeroconf instance

* Add zeroconf to after_dependencies

* Bump version to 5.2.0
2020-05-28 15:52:30 -07:00
Jason Hunter
c710f9994c Fix empty preset element in ONVIF response (#36182) 2020-05-28 15:51:16 -07:00
Paulus Schoutsen
0865791116 Revert DSMR not calling entity methods (#36179) 2020-05-28 15:51:16 -07:00
Markus Bong
d4f7fe16ca Fix cloud connection within API (#36158) 2020-05-28 15:51:15 -07:00
Steven Rollason
e6e7d0651d Check todoist due date is not None in async_get_events (#36140)
* Check that due date is not None

Check that due date is not None, prevents taks without due dates from breaking Calendar API

* Invert None check to reduce indentation
2020-05-28 15:51:14 -07:00
J. Nick Koston
4df8e51edd Use a single service browser for zeroconf discovery (#35997) 2020-05-28 15:51:13 -07:00
Erik Montnemery
2df1c90e6a Let PAHO MQTT client handle connection to MQTT server (#35983)
* Let PAHO client handle connection to MQTT server
2020-05-28 15:51:12 -07:00
Jeff Irion
dc00fa9c27 Fix Android TV icon when screencap option is disabled (#35710)
* Don't return a media image hash if the screencap config option is False

* 1-liner
2020-05-28 15:51:12 -07:00
J. Nick Koston
d1be3c8268 Add ability to ignore heos discovery (#34653)
* Add ability to ignore heos discovery

* Fetch player_id, update tests

* Handle failure state

* Update tests as there are two players in the mock now

* Adjust and add more tests

* Strip out player id lookup

* reverts per review

* one more revert
2020-05-28 15:51:11 -07:00
Erik Montnemery
f1af5b71e2 Correct MQTT device trigger reconfiguration with same topic (#36234) 2020-05-28 15:50:23 -07:00
Erik Montnemery
31250eafe8 Fix custom position range (#36222) 2020-05-28 11:37:09 -06:00
Tom
7e693afcf3 Update plugwise to async and config_flow (#33691)
* Update plugwise async, config_flow and multi entity

* Update battery percentage

* Fix yamllint on services

* Fix yamllint on services

* Fix formatting for pyupgrade

* Update homeassistant/components/plugwise/__init__.py

Co-Authored-By: Robert Svensson <Kane610@users.noreply.github.com>

* Add try/except on setup

* Bump module version, battery version and valve position

* Removing sensor, switch, water_heater for later (child) PRs

* Catchup and version bump

* Remove title from strings.json

* Readd already reviewd await try/except

* Readd already reviewed config_flow

* Fix pylint

* Fix per 0.109 translations

* Remove unused import from merge

* Update plugwise async, config_flow and multi entity

* Update battery percentage

* Fix yamllint on services

* Fix yamllint on services

* Bump module version

* Bump module version, battery version and valve position

* Removing sensor, switch, water_heater for later (child) PRs

* Catchup and version bump

* Remove title from strings.json

* Fix pylint

* Fix per 0.109 translations

* Translations and config_flow, module version bump with required changes

* Translations and config_flow, module version bump with required changes

* Fix requirements

* Fix requirements

* Fix pylint

* Fix pylint

* Update homeassistant/components/plugwise/__init__.py

Improvement

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

* Update homeassistant/components/plugwise/__init__.py

Improvement

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

* Update homeassistant/components/plugwise/__init__.py

Improvement

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

* Include configentrynotready on import

* Update __init__.py

* DataUpdateCoordinator and comment non-PR-platforms

* Fix reqs

* Rename devices variable in favor of entities

* Rework updates with DataUpdateCoordinator

* Peer review

* Peer review second part

* Cleanup comments and redundant code

* Added required config_flow test

* Peer review third part

* Update service was replaced by DataUpdateCoordinator

* Corrected testing, version bump for InvalidAuth, move uniq_id

* Remove according to review

* Await connect (py38)

* Remove unneccesary code

* Show only when multiple

* Improve config_flow, rename consts

* Update homeassistant/components/plugwise/climate.py

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

* Update homeassistant/components/plugwise/climate.py

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

* Process review comments

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-28 10:52:25 -05:00
shbatm
5c516ad013 Add support for Insteon 2444-222 to ISY994 (#36212)
* Add support for Insteon 2444-222 Micro Open/Close Module

* Avoid breaking changes on cover

* Update homeassistant/components/isy994/cover.py

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

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-28 08:51:56 -05:00
Fredrik Erlandsson
03f4202796 Bump pydaikin version to 2.1.0 (#36217) 2020-05-28 12:31:02 +02:00
Maciej Bieniek
3d02b3afc3 Bump pdunehd library to version 1.3.1 (#36198) 2020-05-28 12:27:15 +02:00
Aaron Bach
c18ba6aec0 Remove configuration.yaml support for OpenUV (#36148)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-05-27 15:48:28 -07:00
Aaron Bach
7571fdc957 Allow Guardian config flow to be ignored (#36207)
* Allow Guardian config flow to be ignored

* Tests
2020-05-27 16:45:28 -06:00
jjlawren
4e74fae615 Playback on Sonos speakers from Plex integration (#36177)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-05-27 15:36:08 -07:00
Phil Bruckner
1e9ec917f6 Add support for simultaneous runs of Script helper - Part 3 (#36202) 2020-05-27 15:10:28 -07:00
k2v1n58
f14a4935df Widen songpal volume step change compatibility (#36152)
* Update songpal / media_player.py

Based on issue https://github.com/home-assistant/core/issues/36135

* Update test_media_player.py
2020-05-28 00:09:15 +02:00
Andre Lengwenus
a7842b6301 Fix of LCN cover behavior (#35050) 2020-05-27 23:08:51 +02:00
Ohad Levy
3ac376ebca Fix hassio log message typo (#36194)
minor contribution - thanks for HA :)
2020-05-27 23:07:30 +02:00
Aaron Bach
6609bd94e5 Prevent AirVisual from polling (#36199)
* Prevent AirVisual from polling

* Docstring
2020-05-27 13:53:14 -06:00
J. Nick Koston
f626129e2b Proceed with startup if an integration setup blocks for more than 30m (#36082)
* Proceed with startup if an integration setup blocks for more than 30m

* Fix test location

* Fix log call

* naming

* revert

* do not shield from cancelation

* Adjust test since we now cancel when we hit the timeout
2020-05-27 13:43:05 -05:00
Chris Talkington
6fbc3b54bd Fix roku select source with app ids (#36191) 2020-05-27 17:53:26 +02:00
David Zhu
6f4829c390 Add webostv payload option to command service (#36164)
* added optional argument to command service

* Fixed crash when optional argument is not provided

* Updated argument description

* fixed lint error

* Fix isort error

* switched to use dict for optional field instead of json string

* switched to use ATTR_PAYLOAD

* fixed test

* actually fixed test
2020-05-27 15:51:39 +02:00
Erik Montnemery
c7e97f0cf8 Bump zeroconf, pychromecast. Log if zeroconf.get_service_info fails. (#36185) 2020-05-27 07:31:26 -04:00
Nacho Barrientos
a55c6c5f47 Make prometheus light state report robust (#36134) 2020-05-27 09:59:40 +02:00
Joakim Plate
ad6e21182e Switch default media_player device class to settop for google assistant (#36003) 2020-05-26 23:16:21 -07:00
J. Nick Koston
879e2d1afd Improve stability of homekit accessory ids (#35691) 2020-05-26 22:15:00 -07:00
Paulus Schoutsen
cfaa851b5b Revert DSMR not calling entity methods (#36179) 2020-05-26 22:11:40 -07:00
Jason Hunter
cb2821b512 Fix empty preset element in ONVIF response (#36182) 2020-05-26 21:16:15 -07:00
J. Nick Koston
0a6deeb49b Improve history api performance (#35822)
* Improve history api performance

A new option "minimal_response" reduces the amount of data
sent between the first and last history states to only the
"last_changed" and "state" fields.

Calling to_native is now avoided where possible and only
done at the end for rows that will be returned in the response.

When sending the `minimal_response` option, the history
api now returns a json response similar to the following
for an entity

Testing:

History API Response time for 1 day
Average of 10 runs with minimal_response

Before: 19.89s. (content length : 3427428)
After: 8.44s (content length: 592199)

```
[{
	"attributes": {--TRUNCATED--},
	"context": {--TRUNCATED--},
	"entity_id": "binary_sensor.powerwall_status",
	"last_changed": "2020-05-18T23:20:03.213000+00:00",
	"last_updated": "2020-05-18T23:20:03.213000+00:00",
	"state": "on"
},
...
{
	"last_changed": "2020-05-19T00:41:08Z",
	"state": "unavailable"
},
...
{
	"attributes": {--TRUNCATED--},
	"context": {--TRUNCATED--},
	"entity_id": "binary_sensor.powerwall_status",
	"last_changed": "2020-05-19T00:42:08.069698+00:00",
	"last_updated": "2020-05-19T00:42:08.069698+00:00",
	"state": "on"
}]
```

* Remove impossible state check

* Remove another impossible state check

* Update homeassistant/components/history/__init__.py

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

* Reorder to save some indent per review

* Make query response make sense with to_native=False

* Update test for 00:00 to Z change

* Update homeassistant/components/recorder/models.py

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

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-05-26 21:53:56 -05:00
Jeff Irion
6a06d648d7 Fix Android TV icon when screencap option is disabled (#35710)
* Don't return a media image hash if the screencap config option is False

* 1-liner
2020-05-26 19:02:18 -05:00
Charles Garwood
ca1e643bdc Add fan platform to ozw component (#35249)
* Add fan platform

* Add fan discovery schema

* Use constants for dispatcher signal

* Move fan platform to ozw

* Fix fan discovery schema

* Add previous speed to handle value 255

* Make fixture reading more robust

* Add fan tests

* Remove not needed fixture info

* Validate speed

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-05-26 19:48:39 -04:00
jjlawren
59c112a3f2 Decouple media lookup from Plex play_media service (#35663)
* Decouple media lookup from play_media service

* More explicit input/search validation, cleanup, more tests

* Minor cleanup

* Normalize media_type string in lookup call

* Move key lookup, add tests via service calls

* Always allow play_media service calls

* No need to pass arguments to nested functions
2020-05-26 14:39:56 -05:00
Spartan-II-117
6507951bb1 update PyPjlink to 1.2.1 (#36170)
* Update manifest.json

Bump PyPjlink to 1.2.1

* Update requirements_all.txt
2020-05-26 13:44:10 -05:00
J. Nick Koston
9a53240759 Add ability to ignore heos discovery (#34653)
* Add ability to ignore heos discovery

* Fetch player_id, update tests

* Handle failure state

* Update tests as there are two players in the mock now

* Adjust and add more tests

* Strip out player id lookup

* reverts per review

* one more revert
2020-05-26 10:51:50 -05:00
Erik Montnemery
8de863ecf1 Let PAHO MQTT client handle connection to MQTT server (#35983)
* Let PAHO client handle connection to MQTT server
2020-05-26 17:12:22 +02:00
Steven Rollason
514c64619a Check todoist due date is not None in async_get_events (#36140)
* Check that due date is not None

Check that due date is not None, prevents taks without due dates from breaking Calendar API

* Invert None check to reduce indentation
2020-05-26 10:39:53 -04:00
Ville Skyttä
f8416484f8 More data entry flow and HTTP related type hints (#34430) 2020-05-26 09:28:22 -05:00
Markus Bong
bc1dac80b6 Fix cloud connection within API (#36158) 2020-05-26 15:56:49 +02:00
Aaron Bach
369745c4cf Add support for Elexa Guardian water valve controllers (#34627)
* Add support for Elexa Guardian water valve controllers

* Zeroconf + cleanup

* Sensors and services

* API registration

* Service bug fixes

* Fix bug in cleanup

* Tests and coverage

* Fix incorrect service description

* Bump aioguardian

* Bump aioguardian to 0.2.2

* Bump aioguardian to 0.2.3

* Proper entity inheritance

* Give device a proper name

* Code review
2020-05-26 08:47:25 -05:00
Franck Nijhof
4054b1744f Merge pull request #36155 from home-assistant/rc 2020-05-26 13:30:45 +02:00
gadgetmobile
dc2fe66f29 Clean up blebox climate (#36143) 2020-05-26 13:29:19 +02:00
Franck Nijhof
cf585babbe Bumped version to 0.110.3 2020-05-26 12:12:34 +02:00
Bram Kragten
73aca24f30 Update frontend to 20200519.5 (#36154) 2020-05-26 12:11:57 +02:00
Paulus Schoutsen
701f906898 Fix client ID lookup for official apps (#36131) 2020-05-26 12:11:53 +02:00
J. Nick Koston
4c21adfd88 Remove unsupported stop feature with Hunter Douglas Powerview 1.0 Hubs (#36129) 2020-05-26 12:11:49 +02:00
Jason Hunter
ef3019f922 fix preset warning (#36110) 2020-05-26 12:11:45 +02:00
Jason Hunter
79ed8b03dc guard against missing topic (#36108) 2020-05-26 12:11:41 +02:00
Chris Talkington
a1eb513bbc Update rokuecp to 0.4.2 (#36102)
* update rokuecp to 0.4.2

* Update requirements_all.txt

* Update requirements_test_all.txt
2020-05-26 12:11:37 +02:00
J. Nick Koston
a656a40fd7 Ensure homekit bridge state is restored before creating devices (#36098)
* Ensure homekit bridge state is restored before creating devices

* Tests to ensure homekit device registry entry is stable

* remove stray continue
2020-05-26 12:11:34 +02:00
Aaron Bach
53c2227b1d Fix bugs with AirVisual auto-leveling API (#36097)
* Fix bugs with AirVisual auto-leveling API

* Code review

* Code review
2020-05-26 12:11:30 +02:00
Chris Talkington
3d921cec04 Fix roku play/pause during standby (#36096) 2020-05-26 12:11:26 +02:00
Minims
249c00d08f Fix onvif snapshot for Sricam SP009 (#36095) 2020-05-26 12:11:22 +02:00
Thomas Hollstegge
0f7ea290ca Fix emulated_hue compatibility with older devices (#36090)
* Fix emulated_hue compatibility with older devices

* Fix test ugliness

* Fix pylint errors
2020-05-26 12:11:18 +02:00
Daniel Høyer Iversen
7e90d4dd7b Fix opengarage async_setup_platform (#36075)
* opengarage async_setup_platform

* async_add_entities
2020-05-26 12:11:15 +02:00
isk0001y
b6c519e5df Re-read last imap_email_content email when no change (#36065) 2020-05-26 12:11:11 +02:00
Jason Hunter
179e601966 Fix ONVIF config entry unique ID (#36008)
* fallback to device serial number if no mac available

* make password optional to fix #35904

* update tests to reflect new flow

* fix snake case and AsyncMock

* add comments around why weird things are being done
2020-05-26 12:11:08 +02:00
Florent Thoumie
fad79046a8 Fix iaqualink sensors (#36000)
* iaqualink: small sensor fixes

* Re-add device_class, fix type hints.
2020-05-26 12:11:04 +02:00
Florent Thoumie
1eeba0531e Bump iaqualink to 0.3.3 (#35999) 2020-05-26 12:11:00 +02:00
Julius Mittenzwei
011e0a0fcc Bump pyvlx to 0.2.16 (#35971) 2020-05-26 12:10:56 +02:00
MatsNl
26fdb8eb1e Remove commented code in Atag integration (#36153) 2020-05-26 12:06:20 +02:00
Bram Kragten
50b7d24e32 Update frontend to 20200519.5 (#36154) 2020-05-26 11:44:07 +02:00
Kevin Fronczak
97a523e854 Add device classes to Blink sensors (#35620)
* Add device classes, move battery sensor to binary_sensor

* Remove cast to bool
2020-05-26 09:38:41 +02:00
Aaron Bach
599d3ae930 Fix bugs with AirVisual auto-leveling API (#36097)
* Fix bugs with AirVisual auto-leveling API

* Code review

* Code review
2020-05-26 09:00:05 +02:00
MatsNl
67a9622209 Add tests to Atag integration (#35944)
* add tests

* better error handling in dependency

* dont suppress errors

* add support for multiple devices

* add test for Unauthorized status

* raise error on service call failure
2020-05-26 08:38:02 +02:00
Xiaonan Shen
7e67b6b568 Improve Vacuum Entity (#35554) 2020-05-25 17:56:12 -07:00
Bram Kragten
e61280095e Add uuid to google assistant (#35811) 2020-05-25 17:39:09 -07:00
Franck Nijhof
b15bac595d Update Code of Conduct to 2.0 (#36142) 2020-05-25 19:40:40 -04:00
MatthewFlamm
3a97d96dc0 Cache data and update faster after failed updates in NWS (#35722)
* add last_update_success_time  and a failed update interval

* add failed update interval annd valid times to nws

* Revert "add last_update_success_time  and a failed update interval"

This reverts commit 09428c9686.

* extend DataUpdateCoordinator
2020-05-25 18:39:46 -05:00
J. Nick Koston
8cbee76929 Add support for homekit camera motion notification (#35994)
* Add support for homekit camera motion notification

A motion sensor can now be linked to the cameras.

* Increase coverage
2020-05-25 18:05:38 -05:00
Frederik Gladhorn
15539536ad Use speaker-multiple icon for NAD receiver (#34572)
By default media players get a chrome cast icon, which feels
quite wrong for my old style amplifier that doesn't have any
connection to the rest of the word, except for a RS232 port.
2020-05-25 23:50:19 +01:00
J. Nick Koston
3dfeec5033 Implement async_get_stream_source in the camera integration (#35704) 2020-05-25 15:41:50 -07:00
Mariusz Kryński
6fbc3c4a51 Add lock platform to ozw component (#36103)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-05-25 23:51:09 +02:00
Robert Svensson
376e0e0e93 Add Axis MQTT support (#36015)
* Working PoC

* Store

* Handle subscribing to MQTT and stopping stream when first telegram arrives

* Improve naming

* Now with test

* Better strings

* Fix Martins comments

* Improve mock device patching

* Bump dependency to v27
Add MQTT as after dependency
2020-05-25 23:13:34 +02:00
Raman Gupta
db92ffdf89 Clean up vizio translation strings (#35725)
* further vizio string updates

* fix errant find/replace
2020-05-25 16:36:49 -04:00
Aaron Bach
05cbb3f0e4 Remove WWLLN integration (#35926) 2020-05-25 22:34:51 +02:00
Thomas Hollstegge
fa55f01c8c Report entity IDs for min/max sensor platform (#33806)
* Report entity ids for min/max sensor platform

* Use better variable names
2020-05-25 16:08:49 -04:00
teldri
2793e6cdd8 Fallback lg_soundbar sound mode on unknown value (#35892)
* fallback if equaliser setting unknown to temescal

* fallback if equaliser setting unknown to temescal

Change Author

* fix return values, moved fallback code

* add comment to temporary fix
2020-05-25 16:07:58 -04:00
Chris Talkington
654195454b Add roku tv input names to alexa inputs (#36089)
* add roku tv input names to alexa inputs

* Update const.py
2020-05-25 16:06:38 -04:00
Maciej Bieniek
751428fe2b Catch NoIPControl exception (#36088) 2020-05-25 16:05:52 -04:00
Thomas Hollstegge
ed62fe03b0 Fix emulated_hue compatibility with older devices (#36090)
* Fix emulated_hue compatibility with older devices

* Fix test ugliness

* Fix pylint errors
2020-05-25 14:55:23 -05:00
gadgetmobile
a22a86e4d2 Add Blebox climate support (#35373)
* support BleBox climate

* refactor entity async_setup_entry functions

* use constants and simplify hvac mode setting

* apply fixes from review requests in #35370

* remove unneeded const mappings
2020-05-25 14:45:01 -05:00
J. Nick Koston
d2a92ce4f3 Ensure a deleted integration can be removed (#36130)
* Ensure a deleted intergration can be removed

* Update homeassistant/config_entries.py

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

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-05-25 15:40:06 -04:00
Paulus Schoutsen
ba120d4220 Fix client ID lookup for official apps (#36131) 2020-05-25 15:39:24 -04:00
J. Nick Koston
4313d4b26b Ensure homekit bridge state is restored before creating devices (#36098)
* Ensure homekit bridge state is restored before creating devices

* Tests to ensure homekit device registry entry is stable

* remove stray continue
2020-05-25 11:17:30 -05:00
J. Nick Koston
73fa617c1d Remove unsupported stop feature with Hunter Douglas Powerview 1.0 Hubs (#36129) 2020-05-25 17:51:46 +02:00
braam
1f3d3c3e5b Add Unify Circuit (#35756) 2020-05-25 15:51:41 +02:00
isk0001y
71ebf8738f Re-read last imap_email_content email when no change (#36065) 2020-05-25 14:29:26 +02:00
Minims
2375e00029 Fix onvif snapshot for Sricam SP009 (#36095) 2020-05-25 14:02:21 +02:00
Chris Talkington
77eab66e0f Fix roku play/pause during standby (#36096) 2020-05-25 13:55:25 +02:00
Chris Talkington
22a2c386e9 Update rokuecp to 0.4.2 (#36102)
* update rokuecp to 0.4.2

* Update requirements_all.txt

* Update requirements_test_all.txt
2020-05-25 13:40:16 +02:00
Jason Hunter
5dfae0eb7c fix preset warning (#36110) 2020-05-25 13:38:57 +02:00
Jason Hunter
b0012bd5a6 guard against missing topic (#36108) 2020-05-25 13:37:47 +02:00
Daniel Høyer Iversen
12fb6a85d5 Set PARALLEL_UPDATES for Tibber (#35915) 2020-05-25 12:26:03 +02:00
Julius Mittenzwei
59fe5458d0 Bump pyvlx to 0.2.16 (#35971) 2020-05-25 08:31:49 +02:00
HomeAssistant Azure
d4f3bb8ce0 [ci skip] Translation update 2020-05-25 00:02:49 +00:00
mnaggatz
cc1951c13d Use device class constants for velux cover entity (#36078)
* Add support for Velux Gates

* Comment expanded and listing sorted alphabetically.

* There are constants in the cover entity integration for the valid device classes. Import and use those here.

* Blank line deleted

* Reformate code because of "CheckFormat" error

* Import only the names we need instead of the whole module

* Reformate code because of "CheckFormat" error

* isort error
2020-05-25 00:46:31 +02:00
Jason Hunter
bd8848e57a Fix ONVIF config entry unique ID (#36008)
* fallback to device serial number if no mac available

* make password optional to fix #35904

* update tests to reflect new flow

* fix snake case and AsyncMock

* add comments around why weird things are being done
2020-05-24 21:50:50 +02:00
Daniel Høyer Iversen
ed7ac3c1f7 Add Open garage unique_id (#36074) 2020-05-24 17:21:29 +02:00
Alexei Chetroi
fe45935f38 Implement Keen vents as zha cover devices (#36080)
* Implement Keen vents as cover devices

* Update homeassistant/components/zha/cover.py
2020-05-24 11:10:16 -04:00
Franck Nijhof
f897264c7f Merge pull request #36070 from home-assistant/rc 2020-05-24 14:58:42 +02:00
Daniel Høyer Iversen
9212d1c2dc Fix opengarage async_setup_platform (#36075)
* opengarage async_setup_platform

* async_add_entities
2020-05-24 14:28:54 +02:00
Chris Talkington
ab741535f7 Fix roku play/pause support (#35991) 2020-05-24 12:39:45 +02:00
Bas Nijholt
e6065569ae Use Coerce(float) on service options for kef (#35659)
* use Coerce(float) on service options

* defer the type from options list
2020-05-24 12:10:15 +02:00
Franck Nijhof
fb3394f74b Bumped version to 0.110.2 2020-05-24 11:30:01 +02:00
Fredrik Erlandsson
ed4b1d7c9f Bump tellduslive version (#36048) 2020-05-24 11:28:23 +02:00
Jc2k
a90d1b531c Bump aiohomekit (#36041) 2020-05-24 11:28:19 +02:00
J. Nick Koston
bd32a1fabb Fix shade compatibility with hunter douglas powerview 1.0 hubs (#36040) 2020-05-24 11:28:15 +02:00
Sören Oldag
88ebc6a08b Migrate rpi_gpio_pwm to extend LightEntity instead of Light (#36028) 2020-05-24 11:28:11 +02:00
Franck Nijhof
375f170da8 Upgrade hass-nabucasa to 0.34.3 (#36025) 2020-05-24 11:28:06 +02:00
Jason Hunter
cf6cc6c07c Fix ONVIF PTZ and profile encoding issues (#36006)
* allow lib to create AsyncTransport

* fix transport close issue

* fix zoom only cameras without PTZ presets

* catch profiles without encoding configuration

* also catch ServerDisconnectedError for ptz
2020-05-24 11:28:02 +02:00
Bram Kragten
22a12cea5c Update frontend to 20200519.4 (#35987) 2020-05-24 11:27:58 +02:00
Felipe Martins Diel
1feb8ada6c Handle StorageError in the Broadlink integration (#35986) 2020-05-24 11:27:54 +02:00
Martin Hjelmare
47995edd10 Bump python-openzwave-mqtt to 1.0.2 (#35980) 2020-05-24 11:27:49 +02:00
Andre Lengwenus
5ffee336d5 Fix device_registry cleanup behavior (#35977)
* Fix: Only decives which are not referenced by an entity or a config_entry are removed

* Adapted test for async_cleanup

* Changed variable names
2020-05-24 11:27:44 +02:00
Martin Hjelmare
39f9981914 Fix lutron_caseta setup options (#35974) 2020-05-24 11:27:41 +02:00
Jason Hunter
9e1c35cfd7 Bump pyAV and close unclosed outputs (#35960)
* bump pyAV and close unclosed outputs

* skip stream from coverage for now

* fix divide by zero error
2020-05-24 11:27:37 +02:00
Chris Talkington
f4f031e703 Improve ipp unique id parsing (#35959) 2020-05-24 11:27:33 +02:00
Fredrik Erlandsson
970bb346d0 Fix Daikin AC integration for AirBase units (#35952) 2020-05-24 11:27:29 +02:00
Hugues Granger
9401525464 Fix typo in conf[CONF_SSL] (#35946) 2020-05-24 11:27:25 +02:00
Jason Hunter
8a9ba7e72d Fix ONVIF Transport (#35932)
* allow lib to create AsyncTransport

* fix transport close issue
2020-05-24 11:27:22 +02:00
J. Nick Koston
f452e26269 Ensure homekit functions if numpy is unavailable (#35931) 2020-05-24 11:27:18 +02:00
Bram Kragten
d299a92cd3 Update frontend to 20200519.3 (#35925)
* Updated frontend to 20200519.2

* Updated frontend to 20200519.3
2020-05-24 11:27:15 +02:00
Chris Talkington
8d008d31bd Update rokuecp to 0.4.1 (#35899)
* update rokuecp to 0.4.1

* Update requirements_all.txt

* Update requirements_test_all.txt
2020-05-24 11:27:11 +02:00
Aaron Bach
43ec35ee17 Fix Prezzibenzina doing I/O in the event loop (#35881)
* Fix Prezzibenzina doing I/O in the event loop

* Linting
2020-05-24 11:27:07 +02:00
Robert Chmielowiec
534fcefae1 Fix service registration supported features check (#35718) 2020-05-24 11:27:02 +02:00
Aaron Bach
19f36eb5a1 Auto-level AirVisual API calls (#34903) 2020-05-24 11:26:58 +02:00
Alexei Chetroi
f4c5b9f8f8 Add ZHA roller shadows as cover instead of switch (#36059)
* Implement cover for "Shade" ZHA device type.
* Update ZHA cover tests.
* Add stop command
* Coverage.
2020-05-23 22:37:49 -04:00
HomeAssistant Azure
eaa16fa818 [ci skip] Translation update 2020-05-24 00:03:05 +00:00
michaeldavie
4dcff294c9 Update environment_canada camera (#36010)
* Bump env_canada to 0.0.38

* Fix timestamp type
2020-05-23 22:25:00 +02:00
Fredrik Erlandsson
f3411fee41 Bump tellduslive version (#36048) 2020-05-23 21:47:24 +02:00
mnaggatz
a5caf8576b Add support for Velux Gates (#34774) 2020-05-23 20:08:02 +02:00
Chris Talkington
be854b7363 Improve ipp unique id parsing (#35959) 2020-05-23 20:02:49 +02:00
Jc2k
6e3bba07da Bump aiohomekit (#36041) 2020-05-23 19:59:32 +02:00
Franck Nijhof
99e345d6e4 Upgrade hass-nabucasa to 0.34.3 (#36025) 2020-05-23 19:57:39 +02:00
J. Nick Koston
e9a729a46c Fix shade compatibility with hunter douglas powerview 1.0 hubs (#36040) 2020-05-23 19:56:27 +02:00
Erik Montnemery
b136390647 Reset zeroconf log level (#36002) 2020-05-23 11:29:13 -05:00
J. Nick Koston
2c7eee6722 Ensure configured logger severity is respected (#35749) 2020-05-23 18:12:55 +02:00
Robert Chmielowiec
d21cfd869e Fix service registration supported features check (#35718) 2020-05-23 18:11:51 +02:00
J. Nick Koston
b0578018cb Use a single service browser for zeroconf discovery (#35997) 2020-05-23 18:05:41 +02:00
Sören Oldag
cda2da62cf Migrate rpi_gpio_pwm to extend LightEntity instead of Light (#36028) 2020-05-23 14:09:59 +02:00
Alexei Chetroi
04cfd36d06 Fix ZHA climate hvac_action for Centralite thermostat (#35993)
* Centralite specific control seq of operation

* Remove Fan safeguards

* Split hvac_action property.

* Refactor hvac_action property.

Current hvac_action logic is Zen Within thermostat specific and differs
a bit from ZCL specs. Implement it as a separate class.

* Refactor hvac_action property for default thermostat

Follow more closely ZCL specs in parsing hvac state of the thermostat.
2020-05-23 06:22:36 -04:00
Felipe Martins Diel
3d253fa52a Handle StorageError in the Broadlink integration (#35986) 2020-05-23 11:10:06 +02:00
Fredrik Erlandsson
88ebdf3a53 Deprecate Daikin yaml-support (#35768) 2020-05-23 11:08:49 +02:00
Anders Melchiorsen
275c8b6982 Update sonos codeowners (#36016) 2020-05-23 11:08:01 +02:00
Chris Talkington
765bf760b4 Fix roku play/pause support (#35991) 2020-05-23 11:06:48 +02:00
Andre Lengwenus
919f3243de Fix device_registry cleanup behavior (#35977)
* Fix: Only decives which are not referenced by an entity or a config_entry are removed

* Adapted test for async_cleanup

* Changed variable names
2020-05-23 09:46:03 +02:00
Florent Thoumie
f1b91b050c Bump iaqualink to 0.3.3 (#35999) 2020-05-23 08:55:53 +02:00
Florent Thoumie
8b8aa198fa Fix iaqualink sensors (#36000)
* iaqualink: small sensor fixes

* Re-add device_class, fix type hints.
2020-05-23 08:53:10 +02:00
Jason Hunter
0514960bda Fix ONVIF PTZ and profile encoding issues (#36006)
* allow lib to create AsyncTransport

* fix transport close issue

* fix zoom only cameras without PTZ presets

* catch profiles without encoding configuration

* also catch ServerDisconnectedError for ptz
2020-05-22 21:11:30 -04:00
J. Nick Koston
80de233276 Ensure homekit functions if numpy is unavailable (#35931) 2020-05-23 02:52:33 +02:00
HomeAssistant Azure
56efc341dd [ci skip] Translation update 2020-05-23 00:02:41 +00:00
Jason Hunter
0e83cfade1 Fix ONVIF Transport (#35932)
* allow lib to create AsyncTransport

* fix transport close issue
2020-05-22 19:46:11 -04:00
Martin Hjelmare
cc369cd461 Fix lutron_caseta setup options (#35974) 2020-05-22 23:01:48 +02:00
Martin Hjelmare
6dfc362f98 Bump python-openzwave-mqtt to 1.0.2 (#35980) 2020-05-22 23:01:05 +02:00
John Hollowell
f74e2f8abb Update proxmoxer to 1.1.0 (#35951) 2020-05-22 22:53:17 +02:00
Bram Kragten
7043d1e163 Update frontend to 20200519.4 (#35987) 2020-05-22 22:50:03 +02:00
Jason Hunter
8cd905487e Bump pyAV and close unclosed outputs (#35960)
* bump pyAV and close unclosed outputs

* skip stream from coverage for now

* fix divide by zero error
2020-05-22 18:13:37 +02:00
Alexei Chetroi
be416d9fc6 No side effects in zha climate properties (#35942)
* No side effects in properties

* Remove logging
2020-05-22 09:24:42 -04:00
Hugues Granger
7035a6da9f Fix typo in conf[CONF_SSL] (#35946) 2020-05-22 13:08:53 +02:00
Fredrik Erlandsson
8d5cf1a72c Fix Daikin AC integration for AirBase units (#35952) 2020-05-22 12:07:01 +02:00
HomeAssistant Azure
973f66a974 [ci skip] Translation update 2020-05-22 00:05:00 +00:00
Bram Kragten
0dea4f2ad1 Update frontend to 20200519.3 (#35925)
* Updated frontend to 20200519.2

* Updated frontend to 20200519.3
2020-05-21 17:43:30 +02:00
Pascal Vizeli
7c784b6963 Merge pull request #35907 from home-assistant/rc
0.110.1
2020-05-21 12:26:15 +02:00
Marcel van der Veldt
5bef1c223d Add climate platform to ozw (#35566) 2020-05-21 11:19:20 +02:00
Aaron Bach
f5a326c51e Auto-level AirVisual API calls (#34903) 2020-05-21 10:49:18 +02:00
Pascal Vizeli
b266d3aaae Bump version 0.110.1 2020-05-21 08:47:50 +00:00
J. Nick Koston
e170e6563b Fix legacy Hunter Douglas PowerView devices (#35895)
These devices are missing firmware information
as the 1.0 firmware did not provide it.
2020-05-21 08:46:46 +00:00
J. Nick Koston
ddee8b68c6 Ensure storage write consume the data under the lock (#35889)
If two writes trigger at the same time the data would already
be consumed.
2020-05-21 08:46:45 +00:00
J. Nick Koston
c88c011df9 Ensure http can startup if homekit fails to load (#35888)
* Ensure HomeAssistant can startup if homekit fails to load

* Update homeassistant/components/logbook/manifest.json

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-05-21 08:46:43 +00:00
Jason Hunter
ae66f4250c fix mjpeg issue along with some cameras not returning event capabilities properly (#35885) 2020-05-21 08:46:42 +00:00
Daniel Perna
c7008eb761 Fix light profiles for HomeMatic lights (#35882) 2020-05-21 08:46:41 +00:00
Bram Kragten
b9ab6d1e10 Updated frontend to 20200519.1 (#35877) 2020-05-21 08:46:39 +00:00
J. Nick Koston
1c38bcaeb5 Homekit should skip devices that are missing in device registry (#35857)
* Homekit should skip devices that are missing in device registry

* Add test for this failure state
2020-05-21 08:46:38 +00:00
Fredrik Erlandsson
813203a38f Fix Daikin duplicate entries (#35833) 2020-05-21 08:46:37 +00:00
uvjustin
2d76e12c21 Handle None received from pyforked-daapd (#35830)
* Handle None received from API in forked-daapd

* Bump pyforked-daapd version in requirements

* Add test
2020-05-21 08:46:35 +00:00
Emilv2
e979b54413 Fix Delijn sensor naming (#35789) 2020-05-21 08:46:34 +00:00
Daniel Perna
1958d132a9 Fix light profiles for HomeMatic lights (#35882) 2020-05-21 10:35:04 +02:00
J. Nick Koston
b57cabfce7 Homekit should skip devices that are missing in device registry (#35857)
* Homekit should skip devices that are missing in device registry

* Add test for this failure state
2020-05-21 10:30:18 +02:00
J. Nick Koston
6d03496372 Ensure storage write consume the data under the lock (#35889)
If two writes trigger at the same time the data would already
be consumed.
2020-05-21 10:27:40 +02:00
Bram Kragten
4805723a3f Updated frontend to 20200519.1 (#35877) 2020-05-21 10:25:28 +02:00
Chris Talkington
78b57678d8 Update rokuecp to 0.4.1 (#35899)
* update rokuecp to 0.4.1

* Update requirements_all.txt

* Update requirements_test_all.txt
2020-05-21 09:22:49 +02:00
J. Nick Koston
b19223cb37 Fix legacy Hunter Douglas PowerView devices (#35895)
These devices are missing firmware information
as the 1.0 firmware did not provide it.
2020-05-21 09:18:45 +02:00
J. Nick Koston
c2f8e0bf66 Ensure http can startup if homekit fails to load (#35888)
* Ensure HomeAssistant can startup if homekit fails to load

* Update homeassistant/components/logbook/manifest.json

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-05-21 08:48:01 +02:00
Jason Hunter
a82900ae27 fix mjpeg issue along with some cameras not returning event capabilities properly (#35885) 2020-05-20 21:26:27 -04:00
Alexei Chetroi
ed2a43ba5b Fix zha climate tests (#35893) 2020-05-20 20:25:00 -04:00
HomeAssistant Azure
b32ec950ac [ci skip] Translation update 2020-05-21 00:02:31 +00:00
Aaron Bach
19573a9cbe Fix Prezzibenzina doing I/O in the event loop (#35881)
* Fix Prezzibenzina doing I/O in the event loop

* Linting
2020-05-20 16:09:00 -06:00
Martin Hjelmare
1593bdf2e9 Add climate services required features (#35804) 2020-05-20 23:47:30 +02:00
Alexei Chetroi
9907e95c34 Add zha climate (#35682)
* Initial ZHA climate implementation.
* Add retryable_request decorator.
sort helpers imports.

* Check manufacturer for Climate implementation.
* Default zha.climate.operation_list to [Off]
* Migrate to climate 1.0
* Sort imports, properties and methods.
* Handle 'PRESET_NONE' presets.
* Use pi_heating/cooling_demand for HVAC action prop.
* Implement `running_state` HVAC channel property.
For ZHA thermostats which don't support `pi_heating_demand` or
`pi_cooling_demand' attributes.

* wip fan support
* Refactor retryable request logging.
* Rebase cleanup.
* Update climate discovery.
* Fix ZHA climate restoration.
* Bulk configure attribute reports.
* Use configure_reporting_multiple command for Light
More detailed response parsing of configure_reporting_multiple.

* Use ordered list for HVAC cluster attribute reports.
* Don't mutilate HVAC mode list.
* Add fan_mode property to fan channel.
* Fix type hinting.
* Expose fan mode only.
* Implement fan mode setting.
Drop support for HVAC_FAN_ONLY mode.

* Use ClimateEntity as base class.
* Cleanup debug code.
* Update time display for Sinope.
* Don't do many retries.
* Don't use multi attr reporting configuration.
* Make tests pass.
* Drop support for setpoint change source/amount.
* Cleanups.
* Drop aux heat
* Update tests.
* Drop Sinope temperature display code.
* Update tests.
* Refactor temperature setting.
* Update tests.
* Update Fan tests.
* Lint
* Black.
* Use correct logging levels
2020-05-20 16:10:50 -04:00
uvjustin
b3459d9190 Handle None received from pyforked-daapd (#35830)
* Handle None received from API in forked-daapd

* Bump pyforked-daapd version in requirements

* Add test
2020-05-20 21:06:51 +02:00
Emilv2
53a9d39a81 Fix Delijn sensor naming (#35789) 2020-05-20 14:53:01 +02:00
thomkaufmann
4f317353e0 Add Nuki Opener integration (#35702)
* Add Nuki Opener integration

* Update pynuki version requirement; fix typo

* Update requirements_all.txt

* Create base class of shared lock and opener code

* Clean up code formatting

* Update requirements_all; Run isort

* Remove unnecessary pass statements
2020-05-20 14:44:57 +02:00
Fredrik Erlandsson
2b3cf97979 Fix Daikin duplicate entries (#35833) 2020-05-20 13:25:42 +02:00
Franck Nijhof
1502701e2b Merge branch 'master' into dev 2020-05-20 10:39:39 +02:00
Franck Nijhof
ee92d64088 Add UUID to ZeroConf service info (#35623) 2020-05-20 08:37:32 +02:00
Xiaonan Shen
b452db8b67 Add dynamic icon to roomba battery sensor (#35647)
* Add dynamic icon to roomba battery sensor

* Fix lint

* Rename _state to _robot_state
2020-05-20 00:19:27 -05:00
HomeAssistant Azure
c10aa13d0b [ci skip] Translation update 2020-05-20 00:03:49 +00:00
Boris Kaplounovsky
37f9b24a85 Add xiaomi miio services remote_set_led_on/off (#35805)
* Add services remote_set_led_on/remote_set_led_off to control changmi_ir led

* pylint: elif => if

* Fix services.async_register => platform.async_register_entity_service

* Update homeassistant/components/xiaomi_miio/remote.py

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

* more fixes

* async

* more fixes

* fix

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-05-20 00:23:18 +02:00
Robert Svensson
648df6d984 UniFi - Fix disabled entities being enabled after a restart (#35819)
* Async remove call removed too much, resulting in disabled entities coming back after a restart

* Calling super().async_remove is no longer needed, changed to self.async_remove

* Yes, they should be sets...
2020-05-19 23:57:41 +02:00
Tom Harris
28db0cebf0 Fix Insteon cover and smoke detector entities (#35810)
* Bump pyinsteon to 1.0.1

* Fix cover open/close calls

* Add smokebridge sensors

* trigger tests

* trigger tests
2020-05-19 19:38:00 +02:00
Odin Ugedal
6c4a6568f5 Fix timezone issues for db fields in recorder (#35719)
The database fields are timezoned via DateTime(timezone=True), so the
default value should be timezoned too. When using cockroachdb this is
fatal and results in the recorder crashing.
2020-05-19 13:13:27 -04:00
Martin Hjelmare
8970fd8a56 Bump codecov to 2.1.0 (#35808)
* Bump codecov to 2.1.0

* Try to invalidate cache
2020-05-19 13:08:36 -04:00
Bram Kragten
2da718d7e8 Updated frontend to 20200519.0 (#35813) 2020-05-19 13:07:15 -04:00
uvjustin
8c8feb95a9 Change version check in forked-daapd zeroconf step (#35796) 2020-05-19 15:17:02 +02:00
Nick Whyte
a51372f7b3 Fire events on homekit TV remote key press (#29588)
* Fire events on homekit TV remote key press

* Changes from code review

* black

* isort

* flake8

* Update tests/components/homekit/test_type_media_players.py

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

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-19 08:11:04 -05:00
Felipe Martins Diel
2b38df2766 Allow underscores in broadlink hostnames (#35791)
* Allow underscores in hostnames

* Ignore case
2020-05-19 13:46:12 +02:00
Ron Klinkien
12ec476821 Update to garminconnect 0.1.13 (#35750)
* Update to garminconnect 0.1.13

This will fix body composition sensors being unavailable

* Update requirements_all to garminconnect 0.1.13

* Update requirements_test_all.txt
2020-05-19 07:40:31 -04:00
Alexei Chetroi
188255bd81 Bump up ZHA dependencies. (#35797) 2020-05-19 06:50:05 -04:00
Anders Melchiorsen
d6a5cb6083 Upgrade pysonos to 0.0.30 (#35793) 2020-05-19 08:58:51 +02:00
J. Nick Koston
ebed1de581 Avoid creating multiple sqlalchemy sessions in a single history call (#35721)
* Avoid a context switch in the history api

The history api was creating a job to fetch the
states and another job to convert the states to
json. This can be done in a single job which
decreases the overhead of the operation.

* Ensure there is only one sqlalchemy session created per history
query.

Most queries created three sqlalchemy sessions which was
especially slow with sqlite since it opens and closes the
database.

In testing the UI is noticeably faster at generating history
graphs for entites.

* Add additional coverage

* pass hass first to _states_to_json and _get_significant_states
2020-05-19 07:52:38 +02:00
Jason Hunter
aeae4edb74 Fix ONVIF subscription renewal (#35792)
* fix subscription renewal

* catch ValueError for #35762
2020-05-18 23:02:23 -04:00
HomeAssistant Azure
ef6b1f9302 [ci skip] Translation update 2020-05-19 00:04:18 +00:00
gadgetmobile
93fddbed2b Fix review requests for BleBox support from #35370 (#35786)
* fix review requests from #35370

* fix pylint W0621 (redefined-outer-name)
2020-05-18 22:30:15 +02:00
uvjustin
8258fa515d Skip forked_daapd ignored entries with empty entry.data (#35772) 2020-05-18 21:40:39 +02:00
Bram Kragten
a8fb627abc Updated frontend to 20200518.0 (#35785) 2020-05-18 21:38:25 +02:00
Aaron Bach
b464d276e2 Add support for templates in Slack blocks (#34704) 2020-05-18 12:00:23 -06:00
J. Nick Koston
6885d72180 Avoid a context switch in the history api (#35716)
* Avoid a context switch in the history api

The history api was creating a job to fetch the
states and another job to convert the states to
json. This can be done in a single job which
decreases the overhead of the operation.

* Revert to original solution to avoid function redefine each call
2020-05-18 11:57:16 -05:00
MatsNl
aec68a9c2d Bump Atag dependency to 0.3.1.2 (#35776) 2020-05-18 18:12:00 +02:00
Fredrik Erlandsson
d0e8880e48 Fix daikin discovery flow (#35767) 2020-05-18 16:57:52 +02:00
J. Nick Koston
50105eed74 Handle UPS disconnects in NUT (#35758) 2020-05-18 16:23:05 +02:00
Daniel Høyer Iversen
affd11b372 Update mill manifest to reflect config flow (#35748) 2020-05-18 11:00:44 +02:00
Anders Melchiorsen
796e6141ac Handle Sonos changing IP address (#35639) 2020-05-17 20:20:10 -05:00
Josef Schlehofer
52a7a7175b Upgrade sqlalchemy to 1.3.17 (#35745) 2020-05-17 20:07:23 -05:00
HomeAssistant Azure
2e0c0ded51 [ci skip] Translation update 2020-05-18 00:03:08 +00:00
gadgetmobile
312080de08 Cleanup BleBox platforms (#35552) 2020-05-17 18:56:49 -05:00
gadgetmobile
902eb187ef Add Blebox lights support (#35370)
* add BleBox lights support

* cherry pick refactoring from #35552

* Inherit from LightEntity instead of Light

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

* import LightEntity instead of Light

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

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-17 18:54:32 -05:00
Andrew Fahrenholtz
a03cb93f87 Add ARWN rain total and rain rate sensors (#35751)
* add rain total and rain rate sensors

* linting

* linting
2020-05-17 23:17:08 +02:00
J. Nick Koston
03b14c9aae Add sw_version and connections to sonos devices (#35743) 2020-05-17 16:16:50 -05:00
J. Nick Koston
f085fb1499 Set lifx device sw_version (#35739)
This change solves an issue where homekit would
think the firmware was out of date on the bulb
because no version was set.
2020-05-17 16:16:09 -05:00
tetienne
3815d7d74f Add Somfy hub as device (#35209) 2020-05-17 16:14:11 -05:00
J. Nick Koston
8eb7777561 Ensure homekit version strings conform to spec (#35741)
HomeKit requires all version strings to be in the
format MAJOR.MINOR.REVISION
2020-05-17 15:51:51 -05:00
Adam Belebczuk
5104b79b4b Bump PyWeMo version to 0.4.43 (#35693)
* PyWeMo version bump to 0.4.43

Changes necessary to safely upgrade to pyWeMo 0.4.43. This includes catching ActionExceptions that may be thrown by pyWeMo when it is unable to interact with a physical device.

* Black formatting fix

* Fix isort issues

* Code review changes

* More code review fixes

* Linting fix

* Undo dict.get change

* Change a couple instances of dict[key] to dict.get
2020-05-17 22:13:38 +02:00
springstan
b42a197293 Add and use ELECTRICAL_CURRENT_AMPERE, ELECTRICAL_VOLTAGE_AMPERE constants (#33990)
* Add and use ELECTRICAL_CURRENT_AMPERE constant

* Add and use ELECTRICAL_VOLTAGE_AMPERE constant

* Rename ELECTRICAL_VOLTAGE_AMPERE to ELECTRICAL_VOLT_AMPERE

* Fix imports
2020-05-17 15:58:31 +02:00
Tom Harris
dbd821a564 Change Insteon backend module to pyinsteon from insteonplm (#35198)
* Migrate to pyinsteon from insteonplm

* Rename devices entities

* Print ALDB even if not loaded

* Add relay to name map

* Change insteonplm to pyinsteon

* Update requirements_all correctly

* Code review updates

* async_set_speed receive std speed value

* default speed to std medium value

* Call async methods for fan on/off

* Comment await required in loop

* Remove emtpy and add codeowner

* Make services async and remove async_add_job call

* Remove extra logging

* New device as async task and aldb load in loop

* Place lock in context bloxk

* Limiting lock to min

* Remove .env file
2020-05-17 15:27:38 +02:00
uvjustin
47801e7350 Abort forked-daapd zeroconf flow if version < 27 (#35709)
* Change MediaPlayerDevice to MediaPlayerEntity

* Abort zeroconf if mtd-version < 27.0
2020-05-17 09:23:44 -04:00
Tom Harris
71d41cbb71 Add .env file to .gitignore for vscode environment settings (#35200) 2020-05-17 15:17:05 +02:00
rhadamantys
d98bd418b1 Add restore last state for EnOcean Sensors (#34375) 2020-05-17 15:12:49 +02:00
Xiaonan Shen
06d32baea4 Fix garmin_connect test (#35724) 2020-05-17 14:48:56 +02:00
J. Nick Koston
1297a09344 Avoid locking in the logging queue handler (#35700)
* Avoid locking in the logging queue handler

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

* Add coverage for logging handle
2020-05-17 14:39:27 +02:00
Alan Murray
65e509ed8f Add Acmeda integration (#33384)
* First cut of Rollease Acmeda Pulse Hub integration.

* Acmeda integration improvements:
 - Moved common code into a base entity
 - Battery level sensor added
 - Localisation now working

* Added requirement for aiopulse now that it has been uploaded to PyPI.

* Exclude acmeda integration from coverage check as it relies on a hub being present.

* Fix Travis CI build issues.

* Remove unused constants.

* Remove unused group logic from cover.py

* Removed commented code from base.py

* Remove sensors (battery entities) on removal of hub.

* Remove unused groups from sensor.py

* Acmeda device and entity update made fully asynchronous using subscriptions to remove need for config polling.

* Updated aiopulse version dependency.
Removed non-functional battery charging indication.

* Rationalised common code to update entities into helpers.py

* Fix linting issue.

* Correct additional CI pylint errors.

* Index config_entries by entry_id.
Move entity loading and unloading to __init__.py
Add entry_id to dispatcher signal
Removed now unused polling code hub
Added config_flow unit tests

* Tweak to integration config_entry title.

* Bumped aiopulse module to 0.3.2.
Reduced verbosity of aiopulse module.

* Changed to using direct write of device state.
Removed old style async_step_init config_flow step.

* Remove superfluous battery_level and device_state_attributes from battery entity.

* Removal of unused strings.
Removal of unused create_config_flow helper.
Removal of stale comment.

* Remove use of shared container to track existing enities.
Moved removal and deregistration of entities to base class through use of dispatch helper.

* Fixed strings.json

* Fix incorrect use of remove instead of pop on dict.

* Add support for tilting covers, bump aiopulse version number.

* Bump aiopulse version to v0.3.4.
Fixed bug in cover supported_features.

* Bumped aiopulse version to 0.4.0
Update acmeda .coveragerc exclusions

* Removed already configured hub check from __init__.py async_setup_entry
Removed passing in hass reference to base entity class
Renamed entity async_reset to async_will_remove_from_hass
Changed device_info and properties
Migrated to CoveEntity from CoverDevice
Added dispatched_connect cleanup on hub removal
Removed unused entries from manifest
Removed override of battery icon
Renamed translations folder

* Reversed unintended change to .coveragerc

* Fixed config flow for multi-hub discovery.

* Acmeda enhancements as requested by MartinHjelmare

* Force import to connect to hub to retrieve id prior to creating entry

* Remove YAML configuration support.

* Tidied up config_flow and tests:
 - removed unnecessary steps
 - fixed typos

* Removed storage of hub in config_flow.
2020-05-17 12:15:06 +02:00
Raman Gupta
eec1b3e7a7 Reduce Vizio API calls (#35726)
* reduce calls to API

* get apps list every time

* fix typo
2020-05-17 12:13:53 +02:00
Daniel Høyer Iversen
e2551b4e21 Upgrade opengarage lib to 0.1.4 (#35729) 2020-05-17 12:09:16 +02:00
Joakim Plate
62aa16e6e3 Support config entry unload in arcam_fmj (#35656)
* Support entry unload

* Switch to create_task and skip checking for available task
2020-05-17 12:05:21 +02:00
Joao Carreira
df830a50e7 Add support for custom media_type in mediaroom (#34625)
* Add support for custom media_type in mediaroom

* Clean logging

* Fix formatting

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-05-17 10:36:28 +02:00
Steffen Zimmermann
51eebb3906 Add config option to set timeout for wiffi devices (#35694)
* add config option to set timeout for wiffi devices

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

* Move timeout from config flow to option flow

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

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

* Added Window covering controller to deconz tests
2020-05-17 09:57:24 +02:00
HomeAssistant Azure
e94f44f294 [ci skip] Translation update 2020-05-17 00:02:56 +00:00
J. Nick Koston
fca96799a0 Prevent updater from delaying startup (#35708)
* Prevent updater from delaying startup

The updater sometimes times out as seen in
#33833 and the linked issues. The issue was
presenting again today as it appears the service
is overloaded again.

* s/hass.loop/asyncio/g
2020-05-16 23:34:34 +02:00
Alexei Chetroi
98523fbb61 Bump up ZHA dependencies (#35706) 2020-05-16 14:30:54 -04:00
Daniel Perna
cd68f7dc14 Update pyhomematic to 0.1.67 (#35637) 2020-05-16 17:56:26 +02:00
Robert Van Gorkom
11b786a4fc Add config flow to gogogate2 component (#34709)
* Add config flow to gogogate2 component.

* Using a more stable gogogate api.

* Getting config flows working better by using different downstream library.

* Fixing options not getting default values.
Adding availability to cover entity.

* Simplifying return types of function.

* Address PR feedback.

* Making user config flow not abort.

* Using DataUpdateCoordinator.

* Addressing PR feedback.

* Using standard method for using hass.data

* Split auth fail test into separate tests.
2020-05-16 10:53:11 -05:00
gadgetmobile
6e0359efa6 Add Blebox air quality support (#35372)
* support BleBox air-quality

* fixed switch tests via cherry-pick from #35552

* fix test after cherry-picking

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

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

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

* add a simple test

* s/async_migrate_log_handlers_to_queue/async_activate_log_queue_handler/g
2020-05-16 09:29:58 -05:00
Franck Nijhof
d3ae8a938c Fix handling of additional data in core config storage (#35660) 2020-05-16 13:31:15 +02:00
Chris Talkington
aaf515ef67 Prevent discovery of IPP printers lacking identifier (#35630) 2020-05-16 10:48:36 +02:00
Glenn Waters
ab631a51bd Update Universal Powerline Bus event name (#35644) 2020-05-16 10:43:40 +02:00
uvjustin
299a4fa1c0 Change MediaPlayerDevice to MediaPlayerEntity (#35692) 2020-05-16 10:06:35 +02:00
HomeAssistant Azure
f3bb370b3a [ci skip] Translation update 2020-05-16 00:03:50 +00:00
Bram Kragten
bdd99024b1 Updated frontend to 20200515.0 (#35677) 2020-05-16 00:12:58 +02:00
Robert Svensson
714047f789 Axis - Streamline setup and teardown of integration (#35675)
* Streamline setup and teardown of integration

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

* fix tox py37 test failures

* refactor BleBox device class map
2020-05-15 16:48:17 -05:00
Robert Svensson
064321c21e UniFi - Remove unused string definition, pointed out by Bram (#35678) 2020-05-15 23:43:00 +02:00
Jason Hunter
3a3f39b642 ONVIF: Add check around media capabilities (#35667) 2020-05-15 20:05:32 +02:00
J. Nick Koston
7e56f2cc0e Update cast to use shared zeroconf (#35570)
* Update cast to use the shared zeroconf instance

* Add zeroconf to after_dependencies

* Bump version to 5.2.0
2020-05-15 11:09:21 -05:00
zewelor
92756f9b12 Add explicit return none and binary sensor availability to yeelight (#35649)
* Add explicit return none and binary sensor availbility

* Fix
2020-05-15 17:41:53 +02:00
Franck Nijhof
ddb5ed9dc8 Add more information to discovery API (#35624) 2020-05-15 13:29:55 +02:00
Bram Kragten
e74e0d1710 Fix caldav event for calendar panel (#35653) 2020-05-15 12:36:02 +02:00
Xiaonan Shen
6d0909134c Bump roombapy to 1.6.1 (#35650)
* Bump roombapy to 1.6.1

* Improve roomba error handling
2020-05-15 12:18:43 +02:00
Quentame
d8c7a10fd7 Bump python-synology to 0.8.1 (#35640)
* Bump python-synology to 0.8.1

* Fix tests
2020-05-14 22:20:53 -05:00
HomeAssistant Azure
9586e9ebef [ci skip] Translation update 2020-05-15 00:02:56 +00:00
J. Nick Koston
047f3d6061 Fix CI failure on arcam tests (#35641) 2020-05-15 01:27:22 +02:00
Daniel Perna
9adc48c0b0 Fix HM-CC-VD unit, #31083 (#35066) 2020-05-14 23:35:11 +02:00
Joakim Plate
5c0d237c2d Add device triggers to support setting turn_on event (#35456)
* Add device triggers to support setting turn_on event

* Add turn on event

* Add unique_id based on config entry

* Adjust tests for addition of uuid

* Supported features are now always same

* Switch to player_setup fixture that actually start platform

* Update homeassistant/components/arcam_fmj/const.py

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-05-14 23:24:19 +02:00
Boris Kaplounovsky
37cabe5562 Add icons for upload/download sensors for asuswrt (#35581) 2020-05-14 23:06:33 +02:00
Steven Looman
d0d9b4df78 Properly handle incomplete upnp ssdp discovery (#35553) 2020-05-14 22:58:41 +02:00
Franck Nijhof
0be20ec6ab Rename zwave_mqtt to ozw (#35631) 2020-05-14 22:56:04 +02:00
isk0001y
626f72b97a Add tado zone variable open window detected (#34969)
* openwindow0: this is the part for the HA itself

* Update homeassistant/components/tado/sensor.py

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

* Update homeassistant/components/tado/sensor.py

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

* new version after review

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-14 14:48:34 -05:00
Bram Kragten
fca09b2615 Updated frontend to 20200514.1 (#35632) 2020-05-14 21:31:35 +02:00
Alexei Chetroi
7e1c836acb Don't remove deprecated ZHA config option yet (#35627) 2020-05-14 13:50:54 -04:00
zewelor
8cf354c042 Provide yeelight unique_id using ssdp discovery (#35448)
* Provide yeelight unique_id using ssdp discovery

* Fixes

* Comment fix

* Cleanup initialization logic and add unique id to binary sensor

* Update homeassistant/components/yeelight/__init__.py

Co-authored-by: Teemu R. <tpr@iki.fi>

* Update homeassistant/components/yeelight/__init__.py

Co-authored-by: Teemu R. <tpr@iki.fi>

* Update comment

* Update comment

* Fix wrong model docstring

Co-authored-by: Teemu R. <tpr@iki.fi>
2020-05-14 19:44:32 +02:00
uvjustin
9fd6db4b5f Clean up forked_daapd volume saving/setting in async_play_media (#35584)
* Clean up volume saving/setting in async_play_media

* Set source to pipe when queued externally

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

and remove existing html

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

* s/server_info/service_info/
2020-05-14 18:58:40 +02:00
Jason Hunter
b7ab07c987 additional log info and strings fix (#35622) 2020-05-14 11:25:58 -04:00
Anders Melchiorsen
4b00dedff5 Upgrade to pysonos 0.0.29 (#35617) 2020-05-14 10:24:26 -05:00
Ville Skyttä
7d02b15437 Upgrade huawei-lte-api to 1.4.12 (#35618)
https://github.com/Salamek/huawei-lte-api/releases/tag/1.4.12
2020-05-14 17:22:49 +02:00
Marcel van der Veldt
d480cb7b2c Fix zwave_mqtt creating the device name (#35603)
* Fix for creating the device name

Creating the devicename included a typo and was missing the custom (preferred) name set by the OZW Admin tool.

* update comments
2020-05-14 10:33:57 -04:00
starkillerOG
256370afa8 Xiaomi Miio zeroconf discovery (#35352) 2020-05-14 15:59:40 +02:00
Franck Nijhof
c67d035366 Rename zigbee to xbee (#35613) 2020-05-14 12:19:59 +02:00
zacpotts
55b444cccf Fix zwave thermostat specific device type (#35609) 2020-05-14 12:03:53 +02:00
Aaron Bach
c9b702c4c2 Remove Automatic integration (#35029) 2020-05-14 11:24:22 +02:00
Robert Svensson
e6c58c9795 Axis - Code improvements (#35592)
* Adapt library improvements
Clean up integration and tests and make them more like latest changes in UniFi integration

* Bump dependency to v26
2020-05-14 10:49:27 +02:00
Ville Skyttä
cf50ccb919 Run pre-commit gen_requirements_all on pre-commit config changes (#35588) 2020-05-14 07:24:27 +02:00
Bouwe Westerdijk
efb0593473 Bump haanna to 0.15.0 (#35579)
* Link to haanna v0.15.0

* Update requirements_all.txt
2020-05-14 07:03:42 +02:00
Jason Hunter
7ab19bdfcc Additional checks for ONVIF event capabilities (#35599)
catch any exceptions when pulling event capabilities and assume it is not supported
2020-05-13 22:24:38 -04:00
Bram Kragten
99d3046a5b Updated frontend to 20200514.0 (#35598) 2020-05-13 21:37:14 -04:00
HomeAssistant Azure
710f226778 [ci skip] Translation update 2020-05-14 00:02:46 +00:00
Ville Skyttä
e2b45915a6 Upgrade flake8 to 3.8.1, fix findings (#35578) 2020-05-13 17:14:30 -05:00
Franck Nijhof
d6d94473e4 Bumped version to 0.111.0dev0 (#35593) 2020-05-13 23:34:05 +02:00
3270 changed files with 70272 additions and 27353 deletions

View File

@@ -10,6 +10,14 @@ omit =
# omit pieces of code that rely on external devices being present
homeassistant/components/acer_projector/switch.py
homeassistant/components/actiontec/device_tracker.py
homeassistant/components/acmeda/__init__.py
homeassistant/components/acmeda/base.py
homeassistant/components/acmeda/const.py
homeassistant/components/acmeda/cover.py
homeassistant/components/acmeda/errors.py
homeassistant/components/acmeda/helpers.py
homeassistant/components/acmeda/hub.py
homeassistant/components/acmeda/sensor.py
homeassistant/components/adguard/__init__.py
homeassistant/components/adguard/const.py
homeassistant/components/adguard/sensor.py
@@ -38,7 +46,6 @@ omit =
homeassistant/components/android_ip_webcam/*
homeassistant/components/anel_pwrctrl/switch.py
homeassistant/components/anthemav/media_player.py
homeassistant/components/apache_kafka/*
homeassistant/components/apcupsd/*
homeassistant/components/apple_tv/*
homeassistant/components/aqualogic/*
@@ -55,18 +62,13 @@ omit =
homeassistant/components/arwn/sensor.py
homeassistant/components/asterisk_cdr/mailbox.py
homeassistant/components/asterisk_mbox/*
homeassistant/components/atag/__init__.py
homeassistant/components/atag/climate.py
homeassistant/components/atag/sensor.py
homeassistant/components/atag/water_heater.py
homeassistant/components/aten_pe/*
homeassistant/components/atome/*
homeassistant/components/aurora_abb_powerone/sensor.py
homeassistant/components/automatic/*
homeassistant/components/avea/light.py
homeassistant/components/avion/light.py
homeassistant/components/avri/const.py
homeassistant/components/avri/sensor.py
homeassistant/components/azure_event_hub/*
homeassistant/components/azure_service_bus/*
homeassistant/components/baidu/tts.py
homeassistant/components/beewi_smartclim/sensor.py
@@ -76,7 +78,12 @@ omit =
homeassistant/components/bh1750/sensor.py
homeassistant/components/bitcoin/sensor.py
homeassistant/components/bizkaibus/sensor.py
homeassistant/components/blink/*
homeassistant/components/blink/__init__.py
homeassistant/components/blink/alarm_control_panel.py
homeassistant/components/blink/binary_sensor.py
homeassistant/components/blink/camera.py
homeassistant/components/blink/const.py
homeassistant/components/blink/sensor.py
homeassistant/components/blinksticklight/light.py
homeassistant/components/blinkt/light.py
homeassistant/components/blockchain/sensor.py
@@ -115,6 +122,7 @@ omit =
homeassistant/components/cast/*
homeassistant/components/cert_expiry/helper.py
homeassistant/components/channels/*
homeassistant/components/circuit/*
homeassistant/components/cisco_ios/device_tracker.py
homeassistant/components/cisco_mobility_express/device_tracker.py
homeassistant/components/cisco_webex_teams/notify.py
@@ -150,9 +158,14 @@ omit =
homeassistant/components/deluge/switch.py
homeassistant/components/denon/media_player.py
homeassistant/components/denonavr/media_player.py
homeassistant/components/denonavr/receiver.py
homeassistant/components/deutsche_bahn/sensor.py
homeassistant/components/devolo_home_control/__init__.py
homeassistant/components/devolo_home_control/binary_sensor.py
homeassistant/components/devolo_home_control/const.py
homeassistant/components/devolo_home_control/devolo_device.py
homeassistant/components/devolo_home_control/sensor.py
homeassistant/components/devolo_home_control/subscriber.py
homeassistant/components/devolo_home_control/switch.py
homeassistant/components/dht/sensor.py
homeassistant/components/digital_ocean/*
@@ -172,6 +185,8 @@ omit =
homeassistant/components/dsmr_reader/*
homeassistant/components/dte_energy_bridge/sensor.py
homeassistant/components/dublin_bus_transport/sensor.py
homeassistant/components/dunehd/__init__.py
homeassistant/components/dunehd/const.py
homeassistant/components/dunehd/media_player.py
homeassistant/components/dwd_weather_warnings/sensor.py
homeassistant/components/dweet/*
@@ -249,7 +264,6 @@ omit =
homeassistant/components/folder_watcher/*
homeassistant/components/foobot/sensor.py
homeassistant/components/fortios/device_tracker.py
homeassistant/components/fortigate/*
homeassistant/components/foscam/camera.py
homeassistant/components/foscam/const.py
homeassistant/components/foursquare/*
@@ -271,7 +285,6 @@ omit =
homeassistant/components/garmin_connect/sensor.py
homeassistant/components/gc100/*
homeassistant/components/geniushub/*
homeassistant/components/gearbest/sensor.py
homeassistant/components/geizhals/sensor.py
homeassistant/components/gios/__init__.py
homeassistant/components/gios/air_quality.py
@@ -279,10 +292,10 @@ omit =
homeassistant/components/gitlab_ci/sensor.py
homeassistant/components/gitter/sensor.py
homeassistant/components/glances/__init__.py
homeassistant/components/glances/const.py
homeassistant/components/glances/sensor.py
homeassistant/components/gntp/notify.py
homeassistant/components/goalfeed/*
homeassistant/components/gogogate2/cover.py
homeassistant/components/google/*
homeassistant/components/google_cloud/tts.py
homeassistant/components/google_maps/device_tracker.py
@@ -296,6 +309,10 @@ omit =
homeassistant/components/growatt_server/sensor.py
homeassistant/components/gstreamer/media_player.py
homeassistant/components/gtfs/sensor.py
homeassistant/components/guardian/__init__.py
homeassistant/components/guardian/binary_sensor.py
homeassistant/components/guardian/sensor.py
homeassistant/components/guardian/switch.py
homeassistant/components/habitica/*
homeassistant/components/hangouts/*
homeassistant/components/hangouts/__init__.py
@@ -331,6 +348,8 @@ omit =
homeassistant/components/hunterdouglas_powerview/sensor.py
homeassistant/components/hunterdouglas_powerview/cover.py
homeassistant/components/hunterdouglas_powerview/entity.py
homeassistant/components/hvv_departures/sensor.py
homeassistant/components/hvv_departures/__init__.py
homeassistant/components/hydrawise/*
homeassistant/components/hyperion/light.py
homeassistant/components/ialarm/alarm_control_panel.py
@@ -423,7 +442,6 @@ omit =
homeassistant/components/linux_battery/sensor.py
homeassistant/components/lirc/*
homeassistant/components/llamalab_automate/notify.py
homeassistant/components/lockitron/lock.py
homeassistant/components/logi_circle/__init__.py
homeassistant/components/logi_circle/camera.py
homeassistant/components/logi_circle/const.py
@@ -434,7 +452,13 @@ omit =
homeassistant/components/luftdaten/*
homeassistant/components/lupusec/*
homeassistant/components/lutron/*
homeassistant/components/lutron_caseta/*
homeassistant/components/lutron_caseta/__init__.py
homeassistant/components/lutron_caseta/binary_sensor.py
homeassistant/components/lutron_caseta/cover.py
homeassistant/components/lutron_caseta/fan.py
homeassistant/components/lutron_caseta/light.py
homeassistant/components/lutron_caseta/scene.py
homeassistant/components/lutron_caseta/switch.py
homeassistant/components/lw12wifi/light.py
homeassistant/components/lyft/sensor.py
homeassistant/components/magicseaweed/sensor.py
@@ -524,6 +548,7 @@ omit =
homeassistant/components/notion/sensor.py
homeassistant/components/noaa_tides/sensor.py
homeassistant/components/norway_air/air_quality.py
homeassistant/components/notify_events/notify.py
homeassistant/components/nsw_fuel_station/sensor.py
homeassistant/components/nuimo_controller/*
homeassistant/components/nuki/lock.py
@@ -551,7 +576,9 @@ omit =
homeassistant/components/openevse/sensor.py
homeassistant/components/openexchangerates/sensor.py
homeassistant/components/opengarage/cover.py
homeassistant/components/openhome/__init__.py
homeassistant/components/openhome/media_player.py
homeassistant/components/openhome/const.py
homeassistant/components/opensensemap/air_quality.py
homeassistant/components/opensky/sensor.py
homeassistant/components/opentherm_gw/__init__.py
@@ -589,7 +616,11 @@ omit =
homeassistant/components/plaato/*
homeassistant/components/plex/media_player.py
homeassistant/components/plex/sensor.py
homeassistant/components/plugwise/*
homeassistant/components/plugwise/__init__.py
homeassistant/components/plugwise/binary_sensor.py
homeassistant/components/plugwise/climate.py
homeassistant/components/plugwise/sensor.py
homeassistant/components/plugwise/switch.py
homeassistant/components/plum_lightpad/*
homeassistant/components/pocketcasts/sensor.py
homeassistant/components/point/*
@@ -694,7 +725,11 @@ omit =
homeassistant/components/sinch/*
homeassistant/components/slide/*
homeassistant/components/sma/sensor.py
homeassistant/components/smappee/*
homeassistant/components/smappee/__init__.py
homeassistant/components/smappee/api.py
homeassistant/components/smappee/binary_sensor.py
homeassistant/components/smappee/sensor.py
homeassistant/components/smappee/switch.py
homeassistant/components/smarty/*
homeassistant/components/smarthab/*
homeassistant/components/sms/*
@@ -712,7 +747,6 @@ omit =
homeassistant/components/soma/__init__.py
homeassistant/components/somfy/*
homeassistant/components/somfy_mylink/*
homeassistant/components/sonarr/sensor.py
homeassistant/components/sonos/*
homeassistant/components/sony_projector/switch.py
homeassistant/components/spc/*
@@ -721,12 +755,14 @@ omit =
homeassistant/components/spotcrime/sensor.py
homeassistant/components/spotify/__init__.py
homeassistant/components/spotify/media_player.py
homeassistant/components/squeezebox/*
homeassistant/components/squeezebox/__init__.py
homeassistant/components/squeezebox/media_player.py
homeassistant/components/starline/*
homeassistant/components/starlingbank/sensor.py
homeassistant/components/steam_online/sensor.py
homeassistant/components/stiebel_eltron/*
homeassistant/components/stookalert/*
homeassistant/components/stream/*
homeassistant/components/streamlabswater/*
homeassistant/components/suez_water/*
homeassistant/components/supervisord/sensor.py
@@ -741,6 +777,7 @@ omit =
homeassistant/components/synology/camera.py
homeassistant/components/synology_chat/notify.py
homeassistant/components/synology_dsm/__init__.py
homeassistant/components/synology_dsm/binary_sensor.py
homeassistant/components/synology_dsm/sensor.py
homeassistant/components/synology_srm/device_tracker.py
homeassistant/components/syslog/notify.py
@@ -776,6 +813,7 @@ omit =
homeassistant/components/thomson/device_tracker.py
homeassistant/components/tibber/*
homeassistant/components/tikteck/light.py
homeassistant/components/tile/__init__.py
homeassistant/components/tile/device_tracker.py
homeassistant/components/time_date/sensor.py
homeassistant/components/tmb/sensor.py
@@ -783,7 +821,16 @@ omit =
homeassistant/components/todoist/const.py
homeassistant/components/tof/sensor.py
homeassistant/components/tomato/device_tracker.py
homeassistant/components/toon/*
homeassistant/components/toon/__init__.py
homeassistant/components/toon/binary_sensor.py
homeassistant/components/toon/climate.py
homeassistant/components/toon/const.py
homeassistant/components/toon/coordinator.py
homeassistant/components/toon/helpers.py
homeassistant/components/toon/models.py
homeassistant/components/toon/oauth2.py
homeassistant/components/toon/sensor.py
homeassistant/components/toon/switch.py
homeassistant/components/torque/sensor.py
homeassistant/components/totalconnect/*
homeassistant/components/touchline/climate.py
@@ -865,15 +912,19 @@ omit =
homeassistant/components/wirelesstag/*
homeassistant/components/worldtidesinfo/sensor.py
homeassistant/components/worxlandroid/sensor.py
homeassistant/components/wunderlist/*
homeassistant/components/wwlln/__init__.py
homeassistant/components/wwlln/geo_location.py
homeassistant/components/x10/light.py
homeassistant/components/xbox_live/sensor.py
homeassistant/components/xeoma/camera.py
homeassistant/components/xfinity/device_tracker.py
homeassistant/components/xiaomi/camera.py
homeassistant/components/xiaomi_aqara/*
homeassistant/components/xiaomi_aqara/__init__.py
homeassistant/components/xiaomi_aqara/binary_sensor.py
homeassistant/components/xiaomi_aqara/const.py
homeassistant/components/xiaomi_aqara/cover.py
homeassistant/components/xiaomi_aqara/light.py
homeassistant/components/xiaomi_aqara/lock.py
homeassistant/components/xiaomi_aqara/sensor.py
homeassistant/components/xiaomi_aqara/switch.py
homeassistant/components/xiaomi_miio/__init__.py
homeassistant/components/xiaomi_miio/air_quality.py
homeassistant/components/xiaomi_miio/alarm_control_panel.py
@@ -915,7 +966,7 @@ omit =
homeassistant/components/zha/light.py
homeassistant/components/zha/sensor.py
homeassistant/components/zhong_hong/climate.py
homeassistant/components/zigbee/*
homeassistant/components/xbee/*
homeassistant/components/ziggo_mediabox_xl/media_player.py
homeassistant/components/zoneminder/*
homeassistant/components/supla/*

2
.gitattributes vendored
View File

@@ -8,3 +8,5 @@
*.png binary
*.zip binary
*.mp3 binary
Dockerfile.dev linguist-language=Dockerfile

View File

@@ -21,7 +21,7 @@
- Home Assistant Core release with the issue:
- Last working Home Assistant Core release (if known):
- Operating environment (Home Assistant/Supervised/Docker/venv):
- Operating environment (OS/Container/Supervised/Core):
- Integration causing this issue:
- Link to integration documentation on our website:

View File

@@ -25,7 +25,7 @@ about: Report an issue with Home Assistant Core
- Home Assistant Core release with the issue:
- Last working Home Assistant Core release (if known):
- Operating environment (Home Assistant/Supervised/Docker/venv):
- Operating environment (OS/Container/Supervised/Core):
- Integration causing this issue:
- Link to integration documentation on our website:

1
.gitignore vendored
View File

@@ -106,6 +106,7 @@ virtualization/vagrant/config
!.vscode/cSpell.json
!.vscode/extensions.json
!.vscode/tasks.json
.env
# Built docs
docs/build

View File

@@ -22,7 +22,7 @@ repos:
- --quiet-level=2
exclude_types: [csv, json]
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
rev: 3.8.1
hooks:
- id: flake8
additional_dependencies:
@@ -80,8 +80,8 @@ repos:
entry: script/run-in-env.sh python3 -m script.gen_requirements_all
pass_filenames: false
language: script
types: [json]
files: ^homeassistant/.+/manifest\.json$
types: [text]
files: ^(homeassistant/.+/manifest\.json|\.pre-commit-config\.yaml)$
- id: hassfest
name: hassfest
entry: script/run-in-env.sh python3 -m script.hassfest

View File

@@ -14,6 +14,7 @@ homeassistant/scripts/check_config.py @kellerza
# Integrations
homeassistant/components/abode/* @shred86
homeassistant/components/acmeda/* @atmurray
homeassistant/components/adguard/* @frenck
homeassistant/components/agent_dvr/* @ispysoftware
homeassistant/components/airly/* @bieniu
@@ -42,11 +43,10 @@ homeassistant/components/atome/* @baqs
homeassistant/components/august/* @bdraco
homeassistant/components/aurora_abb_powerone/* @davet2001
homeassistant/components/auth/* @home-assistant/core
homeassistant/components/automatic/* @armills
homeassistant/components/automation/* @home-assistant/core
homeassistant/components/avea/* @pattyland
homeassistant/components/avri/* @timvancann
homeassistant/components/awair/* @danielsjf
homeassistant/components/awair/* @ahayworth @danielsjf
homeassistant/components/aws/* @awarecan @robbiet480
homeassistant/components/axis/* @Kane610
homeassistant/components/azure_event_hub/* @eavanvalkenburg
@@ -57,7 +57,7 @@ homeassistant/components/bizkaibus/* @UgaitzEtxebarria
homeassistant/components/blebox/* @gadgetmobile
homeassistant/components/blink/* @fronzbot
homeassistant/components/bmp280/* @belidzs
homeassistant/components/bmw_connected_drive/* @gerard33
homeassistant/components/bmw_connected_drive/* @gerard33 @rikroe
homeassistant/components/bom/* @maddenp
homeassistant/components/braviatv/* @robbiet480 @bieniu
homeassistant/components/broadlink/* @danielhiversen @felipediel
@@ -68,6 +68,7 @@ homeassistant/components/bt_smarthub/* @jxwolstenholme
homeassistant/components/buienradar/* @mjj4791 @ties
homeassistant/components/cast/* @emontnemery
homeassistant/components/cert_expiry/* @Cereal2nd @jjlawren
homeassistant/components/circuit/* @braam
homeassistant/components/cisco_ios/* @fbradyirl
homeassistant/components/cisco_mobility_express/* @fbradyirl
homeassistant/components/cisco_webex_teams/* @fbradyirl
@@ -85,8 +86,9 @@ homeassistant/components/cpuspeed/* @fabaff
homeassistant/components/cups/* @fabaff
homeassistant/components/daikin/* @fredrike
homeassistant/components/darksky/* @fabaff
homeassistant/components/debugpy/* @frenck
homeassistant/components/deconz/* @Kane610
homeassistant/components/delijn/* @bollewolle
homeassistant/components/delijn/* @bollewolle @Emilv2
homeassistant/components/demo/* @home-assistant/core
homeassistant/components/denonavr/* @scarface-4711 @starkillerOG
homeassistant/components/derivative/* @afaucogney
@@ -97,6 +99,7 @@ homeassistant/components/directv/* @ctalkington
homeassistant/components/discogs/* @thibmaek
homeassistant/components/doorbird/* @oblogic7 @bdraco
homeassistant/components/dsmr_reader/* @depl0y
homeassistant/components/dunehd/* @bieniu
homeassistant/components/dweet/* @fabaff
homeassistant/components/dynalite/* @ziv1234
homeassistant/components/dyson/* @etheralm
@@ -131,7 +134,6 @@ homeassistant/components/flock/* @fabaff
homeassistant/components/flume/* @ChrisMandich @bdraco
homeassistant/components/flunearyou/* @bachya
homeassistant/components/forked_daapd/* @uvjustin
homeassistant/components/fortigate/* @kifeo
homeassistant/components/fortios/* @kimfrellsen
homeassistant/components/foscam/* @skgsergio
homeassistant/components/foursquare/* @robbiet480
@@ -140,7 +142,6 @@ homeassistant/components/fronius/* @nielstron
homeassistant/components/frontend/* @home-assistant/frontend
homeassistant/components/garmin_connect/* @cyberjunky
homeassistant/components/gdacs/* @exxamalte
homeassistant/components/gearbest/* @HerrHofrat
homeassistant/components/geniushub/* @zxdavb
homeassistant/components/geo_rss_events/* @exxamalte
homeassistant/components/geonetnz_quakes/* @exxamalte
@@ -149,6 +150,7 @@ homeassistant/components/gios/* @bieniu
homeassistant/components/gitter/* @fabaff
homeassistant/components/glances/* @fabaff @engrbm87
homeassistant/components/gntp/* @robbiet480
homeassistant/components/gogogate2/* @vangorra
homeassistant/components/google_assistant/* @home-assistant/cloud
homeassistant/components/google_cloud/* @lufton
homeassistant/components/google_translate/* @awarecan
@@ -159,6 +161,7 @@ homeassistant/components/griddy/* @bdraco
homeassistant/components/group/* @home-assistant/core
homeassistant/components/growatt_server/* @indykoning
homeassistant/components/gtfs/* @robbiet480
homeassistant/components/guardian/* @bachya
homeassistant/components/harmony/* @ehendrix23 @bramkragten @bdraco
homeassistant/components/hassio/* @home-assistant/hass-io
homeassistant/components/heatmiser/* @andylockran
@@ -178,10 +181,13 @@ homeassistant/components/homematicip_cloud/* @SukramJ
homeassistant/components/honeywell/* @zxdavb
homeassistant/components/html5/* @robbiet480
homeassistant/components/http/* @home-assistant/core
homeassistant/components/huawei_lte/* @scop
homeassistant/components/huawei_lte/* @scop @fphammerle
homeassistant/components/huawei_router/* @abmantis
homeassistant/components/hue/* @balloob
homeassistant/components/humidifier/* @home-assistant/core @Shulyaka
homeassistant/components/hunterdouglas_powerview/* @bdraco
homeassistant/components/hvv_departures/* @vigonotion
homeassistant/components/hydrawise/* @ptcryan
homeassistant/components/iammeter/* @lewei50
homeassistant/components/iaqualink/* @flz
homeassistant/components/icloud/* @Quentame
@@ -193,6 +199,7 @@ homeassistant/components/input_datetime/* @home-assistant/core
homeassistant/components/input_number/* @home-assistant/core
homeassistant/components/input_select/* @home-assistant/core
homeassistant/components/input_text/* @home-assistant/core
homeassistant/components/insteon/* @teharris1
homeassistant/components/integration/* @dgomes
homeassistant/components/intent/* @home-assistant/core
homeassistant/components/intesishome/* @jnimmo
@@ -239,6 +246,7 @@ homeassistant/components/melissa/* @kennedyshead
homeassistant/components/met/* @danielhiversen
homeassistant/components/meteo_france/* @victorcerutti @oncleben31 @Quentame
homeassistant/components/meteoalarm/* @rolfberkenbosch
homeassistant/components/metoffice/* @MrHarcombe
homeassistant/components/miflora/* @danielhiversen @ChristianKuehnel
homeassistant/components/mikrotik/* @engrbm87
homeassistant/components/mill/* @danielhiversen
@@ -270,6 +278,7 @@ homeassistant/components/nissan_leaf/* @filcole
homeassistant/components/nmbs/* @thibmaek
homeassistant/components/no_ip/* @fabaff
homeassistant/components/notify/* @home-assistant/core
homeassistant/components/notify_events/* @matrozov @papajojo
homeassistant/components/notion/* @bachya
homeassistant/components/nsw_fuel_station/* @nickw444
homeassistant/components/nsw_rural_fire_service_feed/* @exxamalte
@@ -306,11 +315,12 @@ homeassistant/components/pilight/* @trekky12
homeassistant/components/plaato/* @JohNan
homeassistant/components/plant/* @ChristianKuehnel
homeassistant/components/plex/* @jjlawren
homeassistant/components/plugwise/* @laetificat @CoMPaTech @bouwew
homeassistant/components/plum_lightpad/* @ColinHarrington
homeassistant/components/plugwise/* @CoMPaTech @bouwew
homeassistant/components/plum_lightpad/* @ColinHarrington @prystupa
homeassistant/components/point/* @fredrike
homeassistant/components/powerwall/* @bdraco @jrester
homeassistant/components/proxmoxve/* @k4ds3
homeassistant/components/prometheus/* @knyar
homeassistant/components/proxmoxve/* @k4ds3 @jhollowe
homeassistant/components/ps4/* @ktnrg45
homeassistant/components/ptvsd/* @swamp-ig
homeassistant/components/push/* @dgomes
@@ -358,6 +368,7 @@ homeassistant/components/sinch/* @bendikrb
homeassistant/components/sisyphus/* @jkeljo
homeassistant/components/slide/* @ualex73
homeassistant/components/sma/* @kellerza
homeassistant/components/smappee/* @bsmappee
homeassistant/components/smarthab/* @outadoc
homeassistant/components/smartthings/* @andrewsayre
homeassistant/components/smarty/* @z0mbieprocess
@@ -370,9 +381,8 @@ homeassistant/components/soma/* @ratsept
homeassistant/components/somfy/* @tetienne
homeassistant/components/sonarr/* @ctalkington
homeassistant/components/songpal/* @rytilahti @shenxn
homeassistant/components/sonos/* @amelchio
homeassistant/components/spaceapi/* @fabaff
homeassistant/components/speedtestdotnet/* @rohankapoorcom
homeassistant/components/speedtestdotnet/* @rohankapoorcom @engrbm87
homeassistant/components/spider/* @peternijssen
homeassistant/components/spotify/* @frenck
homeassistant/components/sql/* @dgomes
@@ -450,13 +460,11 @@ homeassistant/components/watson_tts/* @rutkai
homeassistant/components/weather/* @fabaff
homeassistant/components/webostv/* @bendavid
homeassistant/components/websocket_api/* @home-assistant/core
homeassistant/components/wemo/* @sqldiablo
homeassistant/components/wiffi/* @mampfes
homeassistant/components/withings/* @vangorra
homeassistant/components/wled/* @frenck
homeassistant/components/workday/* @fabaff
homeassistant/components/worldclock/* @fabaff
homeassistant/components/wwlln/* @bachya
homeassistant/components/xbox_live/* @MartinHjelmare
homeassistant/components/xfinity/* @cisasteelersfan
homeassistant/components/xiaomi_aqara/* @danielhiversen @syssi

View File

@@ -2,79 +2,139 @@
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
Examples of behavior that contributes to a positive environment for our
community include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior by participants include:
Examples of unacceptable behavior include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
## Enforcement Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [safety@home-assistant.io][email]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
reported to the community leaders responsible for enforcement at
[safety@home-assistant.io][email] or by using the report/flag feature of
the medium used. All complaints will be reviewed and investigated promptly and
fairly.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available [here][version].
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available [here][version].
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder][mozilla].
## Adoption
This Code of Conduct was first adopted January 21st, 2017 and announced in [this][coc-blog] blog post.
This Code of Conduct was first adopted January 21st, 2017 and announced in
[this][coc-blog] blog post and has been updated on May 25th, 2020 to version
2.0 of the [Contributor Covenant][homepage] as announced in [this][coc2-blog]
blog post.
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
For answers to common questions about this code of conduct, see the FAQ at
<https://www.contributor-covenant.org/faq>. Translations are available at
<https://www.contributor-covenant.org/translations>.
[coc-blog]: /blog/2017/01/21/home-assistant-governance/
[coc2-blog]: /blog/2020/05/25/code-of-conduct-updated/
[email]: mailto:safety@home-assistant.io
[coc-blog]: https://home-assistant.io/blog/2017/01/21/home-assistant-governance/
[homepage]: http://contributor-covenant.org
[mozilla]: https://github.com/mozilla/diversity
[version]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html

View File

@@ -1,4 +1,4 @@
FROM python:3.8
FROM mcr.microsoft.com/vscode/devcontainers/python:0-3.8
RUN \
apt-get update && apt-get install -y --no-install-recommends \

View File

@@ -158,7 +158,7 @@ stages:
steps:
- template: templates/azp-step-cache.yaml@azure
parameters:
keyfile: "requirements_test_all.txt | homeassistant/package_constraints.txt"
keyfile: "requirements_test_all.txt | requirements_test.txt | homeassistant/package_constraints.txt"
build: |
set -e
python -m venv venv

View File

@@ -117,7 +117,8 @@ class TotpAuthModule(MultiFactorAuthModule):
Mfa module should extend SetupFlow
"""
user = await self.hass.auth.async_get_user(user_id) # type: ignore
user = await self.hass.auth.async_get_user(user_id)
assert user is not None
return TotpSetupFlow(self, self.input_schema, user)
async def async_setup_user(self, user_id: str, setup_data: Any) -> str:

View File

@@ -175,7 +175,7 @@ class LoginFlow(data_entry_flow.FlowHandler):
"""Initialize the login flow."""
self._auth_provider = auth_provider
self._auth_module_id: Optional[str] = None
self._auth_manager = auth_provider.hass.auth # type: ignore
self._auth_manager = auth_provider.hass.auth
self.available_mfa_modules: Dict[str, str] = {}
self.created_at = dt_util.utcnow()
self.invalid_mfa_times = 0
@@ -224,6 +224,7 @@ class LoginFlow(data_entry_flow.FlowHandler):
errors = {}
assert self._auth_module_id is not None
auth_module = self._auth_manager.get_auth_mfa_module(self._auth_module_id)
if auth_module is None:
# Given an invalid input to async_step_select_mfa_module
@@ -234,7 +235,9 @@ class LoginFlow(data_entry_flow.FlowHandler):
auth_module, "async_initialize_login_mfa_step"
):
try:
await auth_module.async_initialize_login_mfa_step(self.user.id)
await auth_module.async_initialize_login_mfa_step( # type: ignore
self.user.id
)
except HomeAssistantError:
_LOGGER.exception("Error initializing MFA step")
return self.async_abort(reason="unknown_error")

View File

@@ -1,6 +1,7 @@
"""Provide methods to bootstrap a Home Assistant instance."""
import asyncio
import contextlib
from datetime import datetime
import logging
import logging.handlers
import os
@@ -14,15 +15,19 @@ import voluptuous as vol
from homeassistant import config as conf_util, config_entries, core, loader
from homeassistant.components import http
from homeassistant.const import (
EVENT_HOMEASSISTANT_CLOSE,
EVENT_HOMEASSISTANT_STOP,
REQUIRED_NEXT_PYTHON_DATE,
REQUIRED_NEXT_PYTHON_VER,
)
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.typing import ConfigType
from homeassistant.setup import DATA_SETUP, async_setup_component
from homeassistant.util.logging import AsyncHandler
from homeassistant.setup import (
DATA_SETUP,
DATA_SETUP_STARTED,
async_set_domains_to_be_loaded,
async_setup_component,
)
from homeassistant.util.logging import async_activate_log_queue_handler
from homeassistant.util.package import async_get_user_site, is_virtual_env
from homeassistant.util.yaml import clear_secret_cache
@@ -33,16 +38,30 @@ ERROR_LOG_FILENAME = "home-assistant.log"
# hass.data key for logging information.
DATA_LOGGING = "logging"
DEBUGGER_INTEGRATIONS = {"ptvsd"}
LOG_SLOW_STARTUP_INTERVAL = 60
DEBUGGER_INTEGRATIONS = {"debugpy", "ptvsd"}
CORE_INTEGRATIONS = ("homeassistant", "persistent_notification")
LOGGING_INTEGRATIONS = {"logger", "system_log", "sentry"}
STAGE_1_INTEGRATIONS = {
LOGGING_INTEGRATIONS = {
# Set log levels
"logger",
# Error logging
"system_log",
"sentry",
# To record data
"recorder",
}
STAGE_1_INTEGRATIONS = {
# To make sure we forward data to other instances
"mqtt_eventstream",
# To provide account link implementations
"cloud",
# Ensure supervisor is available
"hassio",
# Get the frontend up and running as soon
# as possible so problem integrations can
# be removed
"frontend",
}
@@ -117,8 +136,12 @@ async def async_setup_hass(
await hass.async_block_till_done()
safe_mode = True
old_config = hass.config
hass = core.HomeAssistant()
hass.config.config_dir = config_dir
hass.config.skip_pip = old_config.skip_pip
hass.config.internal_url = old_config.internal_url
hass.config.external_url = old_config.external_url
hass.config.config_dir = old_config.config_dir
if safe_mode:
_LOGGER.info("Starting in safe mode")
@@ -278,24 +301,17 @@ def async_enable_logging(
err_handler.setLevel(logging.INFO if verbose else logging.WARNING)
err_handler.setFormatter(logging.Formatter(fmt, datefmt=datefmt))
async_handler = AsyncHandler(hass.loop, err_handler)
async def async_stop_async_handler(_: Any) -> None:
"""Cleanup async handler."""
logging.getLogger("").removeHandler(async_handler) # type: ignore
await async_handler.async_close(blocking=True)
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_CLOSE, async_stop_async_handler)
logger = logging.getLogger("")
logger.addHandler(async_handler) # type: ignore
logger.setLevel(logging.INFO)
logger.addHandler(err_handler)
logger.setLevel(logging.INFO if verbose else logging.WARNING)
# Save the log file location for access by other components.
hass.data[DATA_LOGGING] = err_log_path
else:
_LOGGER.error("Unable to set up error log %s (access denied)", err_log_path)
async_activate_log_queue_handler(hass)
async def async_mount_local_lib_path(config_dir: str) -> str:
"""Add local library to Python Path.
@@ -326,59 +342,130 @@ def _get_domains(hass: core.HomeAssistant, config: Dict[str, Any]) -> Set[str]:
return domains
async def _async_log_pending_setups(
domains: Set[str], setup_started: Dict[str, datetime]
) -> None:
"""Periodic log of setups that are pending for longer than LOG_SLOW_STARTUP_INTERVAL."""
while True:
await asyncio.sleep(LOG_SLOW_STARTUP_INTERVAL)
remaining = [domain for domain in domains if domain in setup_started]
if remaining:
_LOGGER.info(
"Waiting on integrations to complete setup: %s", ", ".join(remaining),
)
async def async_setup_multi_components(
hass: core.HomeAssistant,
domains: Set[str],
config: Dict[str, Any],
setup_started: Dict[str, datetime],
) -> None:
"""Set up multiple domains. Log on failure."""
futures = {
domain: hass.async_create_task(async_setup_component(hass, domain, config))
for domain in domains
}
log_task = asyncio.create_task(_async_log_pending_setups(domains, setup_started))
await asyncio.wait(futures.values())
log_task.cancel()
errors = [domain for domain in domains if futures[domain].exception()]
for domain in errors:
exception = futures[domain].exception()
assert exception is not None
_LOGGER.error(
"Error setting up integration %s - received exception",
domain,
exc_info=(type(exception), exception, exception.__traceback__),
)
async def _async_set_up_integrations(
hass: core.HomeAssistant, config: Dict[str, Any]
) -> None:
"""Set up all the integrations."""
setup_started = hass.data[DATA_SETUP_STARTED] = {}
domains_to_setup = _get_domains(hass, config)
async def async_setup_multi_components(domains: Set[str]) -> None:
"""Set up multiple domains. Log on failure."""
futures = {
domain: hass.async_create_task(async_setup_component(hass, domain, config))
for domain in domains
}
await asyncio.wait(futures.values())
errors = [domain for domain in domains if futures[domain].exception()]
for domain in errors:
exception = futures[domain].exception()
_LOGGER.error(
"Error setting up integration %s - received exception",
domain,
exc_info=(type(exception), exception, exception.__traceback__),
# Resolve all dependencies so we know all integrations
# that will have to be loaded and start rightaway
integration_cache: Dict[str, loader.Integration] = {}
to_resolve = domains_to_setup
while to_resolve:
old_to_resolve = to_resolve
to_resolve = set()
integrations_to_process = [
int_or_exc
for int_or_exc in await asyncio.gather(
*(
loader.async_get_integration(hass, domain)
for domain in old_to_resolve
),
return_exceptions=True,
)
if isinstance(int_or_exc, loader.Integration)
]
resolve_dependencies_tasks = [
itg.resolve_dependencies()
for itg in integrations_to_process
if not itg.all_dependencies_resolved
]
domains = _get_domains(hass, config)
if resolve_dependencies_tasks:
await asyncio.gather(*resolve_dependencies_tasks)
for itg in integrations_to_process:
integration_cache[itg.domain] = itg
for dep in itg.all_dependencies:
if dep in domains_to_setup:
continue
domains_to_setup.add(dep)
to_resolve.add(dep)
_LOGGER.info("Domains to be set up: %s", domains_to_setup)
logging_domains = domains_to_setup & LOGGING_INTEGRATIONS
# Load logging as soon as possible
if logging_domains:
_LOGGER.info("Setting up logging: %s", logging_domains)
await async_setup_multi_components(hass, logging_domains, config, setup_started)
# Start up debuggers. Start these first in case they want to wait.
debuggers = domains & DEBUGGER_INTEGRATIONS
debuggers = domains_to_setup & DEBUGGER_INTEGRATIONS
if debuggers:
_LOGGER.debug("Starting up debuggers %s", debuggers)
await async_setup_multi_components(debuggers)
domains -= DEBUGGER_INTEGRATIONS
_LOGGER.debug("Setting up debuggers: %s", debuggers)
await async_setup_multi_components(hass, debuggers, config, setup_started)
# Resolve all dependencies of all components so we can find the logging
# and integrations that need faster initialization.
resolved_domains_task = asyncio.gather(
*(loader.async_component_dependencies(hass, domain) for domain in domains),
return_exceptions=True,
)
# calculate what components to setup in what stage
stage_1_domains = set()
# Finish resolving domains
for dep_domains in await resolved_domains_task:
# Result is either a set or an exception. We ignore exceptions
# It will be properly handled during setup of the domain.
if isinstance(dep_domains, set):
domains.update(dep_domains)
# Find all dependencies of any dependency of any stage 1 integration that
# we plan on loading and promote them to stage 1
deps_promotion = STAGE_1_INTEGRATIONS
while deps_promotion:
old_deps_promotion = deps_promotion
deps_promotion = set()
# setup components
logging_domains = domains & LOGGING_INTEGRATIONS
stage_1_domains = domains & STAGE_1_INTEGRATIONS
stage_2_domains = domains - logging_domains - stage_1_domains
for domain in old_deps_promotion:
if domain not in domains_to_setup or domain in stage_1_domains:
continue
if logging_domains:
_LOGGER.info("Setting up %s", logging_domains)
stage_1_domains.add(domain)
await async_setup_multi_components(logging_domains)
dep_itg = integration_cache.get(domain)
if dep_itg is None:
continue
deps_promotion.update(dep_itg.all_dependencies)
stage_2_domains = domains_to_setup - logging_domains - debuggers - stage_1_domains
# Kick off loading the registries. They don't need to be awaited.
asyncio.gather(
@@ -387,47 +474,18 @@ async def _async_set_up_integrations(
hass.helpers.area_registry.async_get_registry(),
)
# Start setup
if stage_1_domains:
await async_setup_multi_components(stage_1_domains)
_LOGGER.info("Setting up stage 1: %s", stage_1_domains)
await async_setup_multi_components(hass, stage_1_domains, config, setup_started)
# Load all integrations
after_dependencies: Dict[str, Set[str]] = {}
# Enables after dependencies
async_set_domains_to_be_loaded(hass, stage_1_domains | stage_2_domains)
for int_or_exc in await asyncio.gather(
*(loader.async_get_integration(hass, domain) for domain in stage_2_domains),
return_exceptions=True,
):
# Exceptions are handled in async_setup_component.
if isinstance(int_or_exc, loader.Integration) and int_or_exc.after_dependencies:
after_dependencies[int_or_exc.domain] = set(int_or_exc.after_dependencies)
last_load = None
while stage_2_domains:
domains_to_load = set()
for domain in stage_2_domains:
after_deps = after_dependencies.get(domain)
# Load if integration has no after_dependencies or they are
# all loaded
if not after_deps or not after_deps - hass.config.components:
domains_to_load.add(domain)
if not domains_to_load or domains_to_load == last_load:
break
_LOGGER.debug("Setting up %s", domains_to_load)
await async_setup_multi_components(domains_to_load)
last_load = domains_to_load
stage_2_domains -= domains_to_load
# These are stage 2 domains that never have their after_dependencies
# satisfied.
if stage_2_domains:
_LOGGER.debug("Final set up: %s", stage_2_domains)
await async_setup_multi_components(stage_2_domains)
_LOGGER.info("Setting up stage 2: %s", stage_2_domains)
await async_setup_multi_components(hass, stage_2_domains, config, setup_started)
# Wrap up startup
_LOGGER.debug("Waiting for startup to wrap up")
await hass.async_block_till_done()

View File

@@ -4,5 +4,8 @@
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/abode",
"requirements": ["abodepy==0.19.0"],
"codeowners": ["@shred86"]
"codeowners": ["@shred86"],
"homekit": {
"models": ["Abode", "Iota"]
}
}

View File

@@ -12,7 +12,7 @@
"user": {
"data": {
"password": "Jelsz\u00f3",
"username": "Email c\u00edm"
"username": "E-mail"
},
"title": "T\u00f6ltse ki az Abode bejelentkez\u00e9si adatait"
}

View File

@@ -12,7 +12,7 @@
"user": {
"data": {
"password": "Password",
"username": "Indirizzo email"
"username": "E-mail"
},
"title": "Inserisci le tue informazioni di accesso Abode"
}

View File

@@ -12,7 +12,7 @@
"user": {
"data": {
"password": "Passwuert",
"username": "E-Mail Adress"
"username": "E-Mail"
},
"title": "F\u00ebllt \u00e4r Abode Login Informatiounen aus."
}

View File

@@ -1,3 +0,0 @@
{
"title": "Abode"
}

View File

@@ -11,8 +11,8 @@
"step": {
"user": {
"data": {
"password": "[%key_id:common::config_flow::data::password%]",
"username": "[%key_id:common::config_flow::data::email%]"
"password": "Has\u0142o",
"username": "Adres e-mail"
},
"title": "Wprowad\u017a informacje logowania Abode"
}

View File

@@ -0,0 +1,59 @@
"""The Rollease Acmeda Automate integration."""
import asyncio
from homeassistant import config_entries, core
from .const import DOMAIN
from .hub import PulseHub
CONF_HUBS = "hubs"
PLATFORMS = ["cover", "sensor"]
async def async_setup(hass: core.HomeAssistant, config: dict):
"""Set up the Rollease Acmeda Automate component."""
return True
async def async_setup_entry(
hass: core.HomeAssistant, config_entry: config_entries.ConfigEntry
):
"""Set up Rollease Acmeda Automate hub from a config entry."""
hub = PulseHub(hass, config_entry)
if not await hub.async_setup():
return False
hass.data.setdefault(DOMAIN, {})
hass.data[DOMAIN][config_entry.entry_id] = hub
for component in PLATFORMS:
hass.async_create_task(
hass.config_entries.async_forward_entry_setup(config_entry, component)
)
return True
async def async_unload_entry(
hass: core.HomeAssistant, config_entry: config_entries.ConfigEntry
):
"""Unload a config entry."""
hub = hass.data[DOMAIN][config_entry.entry_id]
unload_ok = all(
await asyncio.gather(
*[
hass.config_entries.async_forward_entry_unload(config_entry, component)
for component in PLATFORMS
]
)
)
if not await hub.async_reset():
return False
if unload_ok:
hass.data[DOMAIN].pop(config_entry.entry_id)
return unload_ok

View File

@@ -0,0 +1,89 @@
"""Base class for Acmeda Roller Blinds."""
import aiopulse
from homeassistant.core import callback
from homeassistant.helpers import entity
from homeassistant.helpers.device_registry import async_get_registry as get_dev_reg
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_registry import async_get_registry as get_ent_reg
from .const import ACMEDA_ENTITY_REMOVE, DOMAIN, LOGGER
class AcmedaBase(entity.Entity):
"""Base representation of an Acmeda roller."""
def __init__(self, roller: aiopulse.Roller):
"""Initialize the roller."""
self.roller = roller
async def async_remove_and_unregister(self):
"""Unregister from entity and device registry and call entity remove function."""
LOGGER.error("Removing %s %s", self.__class__.__name__, self.unique_id)
ent_registry = await get_ent_reg(self.hass)
if self.entity_id in ent_registry.entities:
ent_registry.async_remove(self.entity_id)
dev_registry = await get_dev_reg(self.hass)
device = dev_registry.async_get_device(
identifiers={(DOMAIN, self.unique_id)}, connections=set()
)
if device is not None:
dev_registry.async_update_device(
device.id, remove_config_entry_id=self.registry_entry.config_entry_id
)
await self.async_remove()
async def async_added_to_hass(self):
"""Entity has been added to hass."""
self.roller.callback_subscribe(self.notify_update)
self.async_on_remove(
async_dispatcher_connect(
self.hass,
ACMEDA_ENTITY_REMOVE.format(self.roller.id),
self.async_remove_and_unregister,
)
)
async def async_will_remove_from_hass(self):
"""Entity being removed from hass."""
self.roller.callback_unsubscribe(self.notify_update)
@callback
def notify_update(self):
"""Write updated device state information."""
LOGGER.debug("Device update notification received: %s", self.name)
self.async_write_ha_state()
@property
def should_poll(self):
"""Report that Acmeda entities do not need polling."""
return False
@property
def unique_id(self):
"""Return the unique ID of this roller."""
return self.roller.id
@property
def device_id(self):
"""Return the ID of this roller."""
return self.roller.id
@property
def name(self):
"""Return the name of roller."""
return self.roller.name
@property
def device_info(self):
"""Return the device info."""
return {
"identifiers": {(DOMAIN, self.unique_id)},
"name": self.roller.name,
"manufacturer": "Rollease Acmeda",
"via_device": (DOMAIN, self.roller.hub.id),
}

View File

@@ -0,0 +1,71 @@
"""Config flow for Rollease Acmeda Automate Pulse Hub."""
import asyncio
from typing import Dict, Optional
import aiopulse
import async_timeout
import voluptuous as vol
from homeassistant import config_entries
from .const import DOMAIN # pylint: disable=unused-import
class AcmedaFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a Acmeda config flow."""
VERSION = 1
CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_POLL
def __init__(self):
"""Initialize the config flow."""
self.discovered_hubs: Optional[Dict[str, aiopulse.Hub]] = None
async def async_step_user(self, user_input=None):
"""Handle a flow initialized by the user."""
if (
user_input is not None
and self.discovered_hubs is not None
# pylint: disable=unsupported-membership-test
and user_input["id"] in self.discovered_hubs
):
# pylint: disable=unsubscriptable-object
return await self.async_create(self.discovered_hubs[user_input["id"]])
# Already configured hosts
already_configured = {
entry.unique_id for entry in self._async_current_entries()
}
hubs = []
try:
with async_timeout.timeout(5):
async for hub in aiopulse.Hub.discover():
if hub.id not in already_configured:
hubs.append(hub)
except asyncio.TimeoutError:
pass
if len(hubs) == 0:
return self.async_abort(reason="all_configured")
if len(hubs) == 1:
return await self.async_create(hubs[0])
self.discovered_hubs = {hub.id: hub for hub in hubs}
return self.async_show_form(
step_id="user",
data_schema=vol.Schema(
{
vol.Required("id"): vol.In(
{hub.id: f"{hub.id} {hub.host}" for hub in hubs}
)
}
),
)
async def async_create(self, hub):
"""Create the Acmeda Hub entry."""
await self.async_set_unique_id(hub.id, raise_on_progress=False)
return self.async_create_entry(title=hub.id, data={"host": hub.host})

View File

@@ -0,0 +1,8 @@
"""Constants for the Rollease Acmeda Automate integration."""
import logging
LOGGER = logging.getLogger(__package__)
DOMAIN = "acmeda"
ACMEDA_HUB_UPDATE = "acmeda_hub_update_{}"
ACMEDA_ENTITY_REMOVE = "acmeda_entity_remove_{}"

View File

@@ -0,0 +1,122 @@
"""Support for Acmeda Roller Blinds."""
from homeassistant.components.cover import (
ATTR_POSITION,
SUPPORT_CLOSE,
SUPPORT_CLOSE_TILT,
SUPPORT_OPEN,
SUPPORT_OPEN_TILT,
SUPPORT_SET_POSITION,
SUPPORT_SET_TILT_POSITION,
SUPPORT_STOP,
SUPPORT_STOP_TILT,
CoverEntity,
)
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from .base import AcmedaBase
from .const import ACMEDA_HUB_UPDATE, DOMAIN
from .helpers import async_add_acmeda_entities
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up the Acmeda Rollers from a config entry."""
hub = hass.data[DOMAIN][config_entry.entry_id]
current = set()
@callback
def async_add_acmeda_covers():
async_add_acmeda_entities(
hass, AcmedaCover, config_entry, current, async_add_entities
)
hub.cleanup_callbacks.append(
async_dispatcher_connect(
hass,
ACMEDA_HUB_UPDATE.format(config_entry.entry_id),
async_add_acmeda_covers,
)
)
class AcmedaCover(AcmedaBase, CoverEntity):
"""Representation of a Acmeda cover device."""
@property
def current_cover_position(self):
"""Return the current position of the roller blind.
None is unknown, 0 is closed, 100 is fully open.
"""
position = None
if self.roller.type != 7:
position = 100 - self.roller.closed_percent
return position
@property
def current_cover_tilt_position(self):
"""Return the current tilt of the roller blind.
None is unknown, 0 is closed, 100 is fully open.
"""
position = None
if self.roller.type == 7 or self.roller.type == 10:
position = 100 - self.roller.closed_percent
return position
@property
def supported_features(self):
"""Flag supported features."""
supported_features = 0
if self.current_cover_position is not None:
supported_features |= (
SUPPORT_OPEN | SUPPORT_CLOSE | SUPPORT_STOP | SUPPORT_SET_POSITION
)
if self.current_cover_tilt_position is not None:
supported_features |= (
SUPPORT_OPEN_TILT
| SUPPORT_CLOSE_TILT
| SUPPORT_STOP_TILT
| SUPPORT_SET_TILT_POSITION
)
return supported_features
@property
def is_closed(self):
"""Return if the cover is closed."""
is_closed = self.roller.closed_percent == 100
return is_closed
async def close_cover(self, **kwargs):
"""Close the roller."""
await self.roller.move_down()
async def open_cover(self, **kwargs):
"""Open the roller."""
await self.roller.move_up()
async def stop_cover(self, **kwargs):
"""Stop the roller."""
await self.roller.move_stop()
async def set_cover_position(self, **kwargs):
"""Move the roller shutter to a specific position."""
await self.roller.move_to(100 - kwargs[ATTR_POSITION])
async def close_cover_tilt(self, **kwargs):
"""Close the roller."""
await self.roller.move_down()
async def open_cover_tilt(self, **kwargs):
"""Open the roller."""
await self.roller.move_up()
async def stop_cover_tilt(self, **kwargs):
"""Stop the roller."""
await self.roller.move_stop()
async def set_cover_tilt(self, **kwargs):
"""Tilt the roller shutter to a specific position."""
await self.roller.move_to(100 - kwargs[ATTR_POSITION])

View File

@@ -0,0 +1,10 @@
"""Errors for the Acmeda Pulse component."""
from homeassistant.exceptions import HomeAssistantError
class PulseException(HomeAssistantError):
"""Base class for Acmeda Pulse exceptions."""
class CannotConnect(PulseException):
"""Unable to connect to the bridge."""

View File

@@ -0,0 +1,41 @@
"""Helper functions for Acmeda Pulse."""
from homeassistant.core import callback
from homeassistant.helpers.device_registry import async_get_registry as get_dev_reg
from .const import DOMAIN, LOGGER
@callback
def async_add_acmeda_entities(
hass, entity_class, config_entry, current, async_add_entities
):
"""Add any new entities."""
hub = hass.data[DOMAIN][config_entry.entry_id]
LOGGER.debug("Looking for new %s on: %s", entity_class.__name__, hub.host)
api = hub.api.rollers
new_items = []
for unique_id, roller in api.items():
if unique_id not in current:
LOGGER.debug("New %s %s", entity_class.__name__, unique_id)
new_item = entity_class(roller)
current.add(unique_id)
new_items.append(new_item)
async_add_entities(new_items)
async def update_devices(hass, config_entry, api):
"""Tell hass that device info has been updated."""
dev_registry = await get_dev_reg(hass)
for api_item in api.values():
# Update Device name
device = dev_registry.async_get_device(
identifiers={(DOMAIN, api_item.id)}, connections=set()
)
if device is not None:
dev_registry.async_update_device(
device.id, name=api_item.name,
)

View File

@@ -0,0 +1,88 @@
"""Code to handle a Pulse Hub."""
import asyncio
from typing import Optional
import aiopulse
from homeassistant.helpers.dispatcher import async_dispatcher_send
from .const import ACMEDA_ENTITY_REMOVE, ACMEDA_HUB_UPDATE, LOGGER
from .helpers import update_devices
class PulseHub:
"""Manages a single Pulse Hub."""
def __init__(self, hass, config_entry):
"""Initialize the system."""
self.config_entry = config_entry
self.hass = hass
self.api: Optional[aiopulse.Hub] = None
self.tasks = []
self.current_rollers = {}
self.cleanup_callbacks = []
@property
def title(self):
"""Return the title of the hub shown in the integrations list."""
return f"{self.api.id} ({self.api.host})"
@property
def host(self):
"""Return the host of this hub."""
return self.config_entry.data["host"]
async def async_setup(self, tries=0):
"""Set up a hub based on host parameter."""
host = self.host
hub = aiopulse.Hub(host)
self.api = hub
hub.callback_subscribe(self.async_notify_update)
self.tasks.append(asyncio.create_task(hub.run()))
LOGGER.debug("Hub setup complete")
return True
async def async_reset(self):
"""Reset this hub to default state."""
for cleanup_callback in self.cleanup_callbacks:
cleanup_callback()
# If not setup
if self.api is None:
return False
self.api.callback_unsubscribe(self.async_notify_update)
await self.api.stop()
del self.api
self.api = None
# Wait for any running tasks to complete
await asyncio.wait(self.tasks)
return True
async def async_notify_update(self, update_type):
"""Evaluate entities when hub reports that update has occurred."""
LOGGER.debug("Hub {update_type.name} updated")
if update_type == aiopulse.UpdateType.rollers:
await update_devices(self.hass, self.config_entry, self.api.rollers)
self.hass.config_entries.async_update_entry(
self.config_entry, title=self.title
)
async_dispatcher_send(
self.hass, ACMEDA_HUB_UPDATE.format(self.config_entry.entry_id)
)
for unique_id in list(self.current_rollers):
if unique_id not in self.api.rollers:
LOGGER.debug("Notifying remove of %s", unique_id)
self.current_rollers.pop(unique_id)
async_dispatcher_send(
self.hass, ACMEDA_ENTITY_REMOVE.format(unique_id)
)

View File

@@ -0,0 +1,10 @@
{
"domain": "acmeda",
"name": "Rollease Acmeda Automate",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/acmeda",
"requirements": ["aiopulse==0.4.0"],
"codeowners": [
"@atmurray"
]
}

View File

@@ -0,0 +1,46 @@
"""Support for Acmeda Roller Blind Batteries."""
from homeassistant.const import DEVICE_CLASS_BATTERY, UNIT_PERCENTAGE
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from .base import AcmedaBase
from .const import ACMEDA_HUB_UPDATE, DOMAIN
from .helpers import async_add_acmeda_entities
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up the Acmeda Rollers from a config entry."""
hub = hass.data[DOMAIN][config_entry.entry_id]
current = set()
@callback
def async_add_acmeda_sensors():
async_add_acmeda_entities(
hass, AcmedaBattery, config_entry, current, async_add_entities
)
hub.cleanup_callbacks.append(
async_dispatcher_connect(
hass,
ACMEDA_HUB_UPDATE.format(config_entry.entry_id),
async_add_acmeda_sensors,
)
)
class AcmedaBattery(AcmedaBase):
"""Representation of a Acmeda cover device."""
device_class = DEVICE_CLASS_BATTERY
unit_of_measurement = UNIT_PERCENTAGE
@property
def name(self):
"""Return the name of roller."""
return f"{super().name} Battery"
@property
def state(self):
"""Return the state of the device."""
return self.roller.battery

View File

@@ -0,0 +1,16 @@
{
"title": "Rollease Acmeda Automate",
"config": {
"step": {
"user": {
"title": "Pick a hub to add",
"data": {
"id": "Host ID"
}
}
},
"abort": {
"all_configured": "No new Pulse hubs discovered."
}
}
}

View File

@@ -0,0 +1,16 @@
{
"config": {
"abort": {
"all_configured": "No s'han descobert nous hubs de Pulse."
},
"step": {
"user": {
"data": {
"id": "ID d'amfitri\u00f3"
},
"title": "Selecci\u00f3 del Hub a afegir"
}
}
},
"title": "Rollease Acmeda Automate"
}

View File

@@ -0,0 +1,12 @@
{
"config": {
"step": {
"user": {
"data": {
"id": "Host-ID"
},
"title": "W\u00e4hlen Sie einen Hub zum Hinzuf\u00fcgen aus"
}
}
}
}

View File

@@ -0,0 +1,16 @@
{
"config": {
"abort": {
"all_configured": "No new Pulse hubs discovered."
},
"step": {
"user": {
"data": {
"id": "Host ID"
},
"title": "Pick a hub to add"
}
}
},
"title": "Rollease Acmeda Automate"
}

View File

@@ -0,0 +1,16 @@
{
"config": {
"abort": {
"all_configured": "No se han descubierto nuevos hubs Pulse."
},
"step": {
"user": {
"data": {
"id": "ID de host"
},
"title": "Elige un hub para a\u00f1adir"
}
}
},
"title": "Rollease Acmeda Automate"
}

View File

@@ -0,0 +1,16 @@
{
"config": {
"abort": {
"all_configured": "Aucun nouveau hub Pulse n'a \u00e9t\u00e9 d\u00e9couvert."
},
"step": {
"user": {
"data": {
"id": "ID de l'h\u00f4te"
},
"title": "Choisissez un hub \u00e0 ajouter"
}
}
},
"title": "Rollease Acmeda Automate"
}

View File

@@ -0,0 +1,16 @@
{
"config": {
"abort": {
"all_configured": "Non sono stati scoperti nuovi hub Pulse."
},
"step": {
"user": {
"data": {
"id": "ID host"
},
"title": "Scegliere un hub da aggiungere"
}
}
},
"title": "Rollease Acmeda Automate"
}

View File

@@ -0,0 +1,16 @@
{
"config": {
"abort": {
"all_configured": "\ubc1c\uacac\ub41c \uc0c8\ub85c\uc6b4 Pulse \ud5c8\ube0c\uac00 \uc5c6\uc2b5\ub2c8\ub2e4."
},
"step": {
"user": {
"data": {
"id": "\ud638\uc2a4\ud2b8 ID"
},
"title": "\ucd94\uac00\ud560 \ud5c8\ube0c \uc120\ud0dd\ud558\uae30"
}
}
},
"title": "Rollease Acmeda Automate"
}

View File

@@ -0,0 +1,16 @@
{
"config": {
"abort": {
"all_configured": "Keng nei Pulse Hubs entdeckt."
},
"step": {
"user": {
"data": {
"id": "Host ID"
},
"title": "Wiel den Hub aus dee soll dob\u00e4igesat ginn."
}
}
},
"title": "Rollease ACmeda Automate"
}

View File

@@ -0,0 +1,16 @@
{
"config": {
"abort": {
"all_configured": "Geen nieuwe Pulse hubs ontdekt."
},
"step": {
"user": {
"data": {
"id": "Host ID"
},
"title": "Kies een hub om toe te voegen"
}
}
},
"title": "Rollease Acmeda Automate"
}

View File

@@ -0,0 +1,16 @@
{
"config": {
"abort": {
"all_configured": "Ingen nye Pulse-hub oppdaget."
},
"step": {
"user": {
"data": {
"id": "Verts-ID"
},
"title": "Velg en hub du vil legge til"
}
}
},
"title": ""
}

View File

@@ -0,0 +1,16 @@
{
"config": {
"abort": {
"all_configured": "Nie wykryto hub\u00f3w Pulse."
},
"step": {
"user": {
"data": {
"id": "ID hosta"
},
"title": "Wybierz hub, kt\u00f3ry chcesz doda\u0107"
}
}
},
"title": "Rollease Acmeda Automate"
}

View File

@@ -0,0 +1,16 @@
{
"config": {
"abort": {
"all_configured": "\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u044b."
},
"step": {
"user": {
"data": {
"id": "ID \u0445\u043e\u0441\u0442\u0430"
},
"title": "\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0445\u0430\u0431, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c"
}
}
},
"title": "Rollease Acmeda Automate"
}

View File

@@ -0,0 +1,16 @@
{
"config": {
"abort": {
"all_configured": "\u672a\u641c\u5c0b\u5230 Pulse hub"
},
"step": {
"user": {
"data": {
"id": "\u4e3b\u6a5f ID"
},
"title": "\u9078\u64c7\u6240\u8981\u65b0\u589e\u7684 Hub"
}
}
},
"title": "Rollease Acmeda Automate"
}

View File

@@ -71,7 +71,7 @@ async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry) -> bool
except AdGuardHomeConnectionError as exception:
raise ConfigEntryNotReady from exception
if LooseVersion(MIN_ADGUARD_HOME_VERSION) > LooseVersion(version):
if version and LooseVersion(MIN_ADGUARD_HOME_VERSION) > LooseVersion(version):
_LOGGER.error(
"This integration requires AdGuard Home v0.99.0 or higher to work correctly"
)

View File

@@ -84,7 +84,7 @@ class AdGuardHomeFlowHandler(ConfigFlow):
errors["base"] = "connection_error"
return await self._show_setup_form(errors)
if LooseVersion(MIN_ADGUARD_HOME_VERSION) > LooseVersion(version):
if version and LooseVersion(MIN_ADGUARD_HOME_VERSION) > LooseVersion(version):
return self.async_abort(
reason="adguard_home_outdated",
description_placeholders={
@@ -105,7 +105,7 @@ class AdGuardHomeFlowHandler(ConfigFlow):
},
)
async def async_step_hassio(self, user_input=None):
async def async_step_hassio(self, discovery_info):
"""Prepare configuration for a Hass.io AdGuard Home add-on.
This flow is triggered by the discovery component.
@@ -113,14 +113,14 @@ class AdGuardHomeFlowHandler(ConfigFlow):
entries = self._async_current_entries()
if not entries:
self._hassio_discovery = user_input
self._hassio_discovery = discovery_info
return await self.async_step_hassio_confirm()
cur_entry = entries[0]
if (
cur_entry.data[CONF_HOST] == user_input[CONF_HOST]
and cur_entry.data[CONF_PORT] == user_input[CONF_PORT]
cur_entry.data[CONF_HOST] == discovery_info[CONF_HOST]
and cur_entry.data[CONF_PORT] == discovery_info[CONF_PORT]
):
return self.async_abort(reason="single_instance_allowed")
@@ -133,8 +133,8 @@ class AdGuardHomeFlowHandler(ConfigFlow):
cur_entry,
data={
**cur_entry.data,
CONF_HOST: user_input[CONF_HOST],
CONF_PORT: user_input[CONF_PORT],
CONF_HOST: discovery_info[CONF_HOST],
CONF_PORT: discovery_info[CONF_PORT],
},
)

View File

@@ -21,8 +21,7 @@
"username": "\u041f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0441\u043a\u043e \u0438\u043c\u0435",
"verify_ssl": "AdGuard Home \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430 \u043d\u0430\u0434\u0435\u0436\u0434\u0435\u043d \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442"
},
"description": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u0412\u0430\u0448\u0438\u044f AdGuard Home, \u0437\u0430 \u0434\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b.",
"title": "\u0421\u0432\u044a\u0440\u0436\u0435\u0442\u0435 \u0412\u0430\u0448\u0438\u044f AdGuard Home."
"description": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u0412\u0430\u0448\u0438\u044f AdGuard Home, \u0437\u0430 \u0434\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b."
}
}
}

View File

@@ -23,8 +23,7 @@
"username": "[%key::common::config_flow::data::username%]",
"verify_ssl": "AdGuard Home utilitza un certificat adequat"
},
"description": "Configuraci\u00f3 de la inst\u00e0ncia d'AdGuard Home, permet el control i la monitoritzaci\u00f3.",
"title": "Enlla\u00e7ar AdGuard Home."
"description": "Configuraci\u00f3 de la inst\u00e0ncia d'AdGuard Home, permet el control i la monitoritzaci\u00f3."
}
}
}

View File

@@ -21,8 +21,7 @@
"username": "Brugernavn",
"verify_ssl": "AdGuard Home bruger et korrekt certifikat"
},
"description": "Konfigurer din AdGuard Home-instans for at tillade overv\u00e5gning og kontrol.",
"title": "Forbind din AdGuard Home."
"description": "Konfigurer din AdGuard Home-instans for at tillade overv\u00e5gning og kontrol."
}
}
}

View File

@@ -23,8 +23,7 @@
"username": "Benutzername",
"verify_ssl": "AdGuard Home verwendet ein richtiges Zertifikat"
},
"description": "Richte deine AdGuard Home-Instanz ein um sie zu \u00dcberwachen und zu Steuern.",
"title": "Verkn\u00fcpfe AdGuard Home."
"description": "Richte deine AdGuard Home-Instanz ein um sie zu \u00dcberwachen und zu Steuern."
}
}
}

View File

@@ -23,8 +23,7 @@
"username": "Username",
"verify_ssl": "AdGuard Home uses a proper certificate"
},
"description": "Set up your AdGuard Home instance to allow monitoring and control.",
"title": "Link your AdGuard Home."
"description": "Set up your AdGuard Home instance to allow monitoring and control."
}
}
}

View File

@@ -16,13 +16,14 @@
},
"user": {
"data": {
"host": "Host",
"password": "Contrase\u00f1a",
"port": "Puerto",
"ssl": "AdGuard Home utiliza un certificado SSL",
"username": "Nombre de usuario",
"verify_ssl": "AdGuard Home utiliza un certificado adecuado"
},
"description": "Configure su instancia de AdGuard Home para permitir la supervisi\u00f3n y el control.",
"title": "Enlace su AdGuard Home."
"description": "Configure su instancia de AdGuard Home para permitir la supervisi\u00f3n y el control."
}
}
}

View File

@@ -23,8 +23,7 @@
"username": "Usuario",
"verify_ssl": "AdGuard Home utiliza un certificado apropiado"
},
"description": "Configure su instancia de AdGuard Home para permitir la supervisi\u00f3n y el control.",
"title": "Enlace su AdGuard Home."
"description": "Configure su instancia de AdGuard Home para permitir la supervisi\u00f3n y el control."
}
}
}

View File

@@ -23,8 +23,7 @@
"username": "Nom d'utilisateur",
"verify_ssl": "AdGuard Home utilise un certificat appropri\u00e9"
},
"description": "Configurez votre instance AdGuard Home pour permettre la surveillance et le contr\u00f4le.",
"title": "Liez votre AdGuard Home."
"description": "Configurez votre instance AdGuard Home pour permettre la surveillance et le contr\u00f4le."
}
}
}

View File

@@ -3,6 +3,7 @@
"step": {
"user": {
"data": {
"host": "Hoszt",
"password": "Jelsz\u00f3",
"port": "Port",
"username": "Felhaszn\u00e1l\u00f3n\u00e9v"

View File

@@ -23,8 +23,7 @@
"username": "Nome utente",
"verify_ssl": "AdGuard Home utilizza un certificato appropriato"
},
"description": "Configura l'istanza di AdGuard Home per consentire il monitoraggio e il controllo.",
"title": "Collega la tua AdGuard Home."
"description": "Configura l'istanza di AdGuard Home per consentire il monitoraggio e il controllo."
}
}
}

View File

@@ -23,8 +23,7 @@
"username": "\uc0ac\uc6a9\uc790 \uc774\ub984",
"verify_ssl": "AdGuard Home \uc740 \uc62c\ubc14\ub978 \uc778\uc99d\uc11c\ub97c \uc0ac\uc6a9\ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4"
},
"description": "\ubaa8\ub2c8\ud130\ub9c1 \ubc0f \uc81c\uc5b4\uac00 \uac00\ub2a5\ud558\ub3c4\ub85d AdGuard Home \uc778\uc2a4\ud134\uc2a4\ub97c \uc124\uc815\ud574\uc8fc\uc138\uc694.",
"title": "AdGuard Home \uc5f0\uacb0\ud558\uae30"
"description": "\ubaa8\ub2c8\ud130\ub9c1 \ubc0f \uc81c\uc5b4\uac00 \uac00\ub2a5\ud558\ub3c4\ub85d AdGuard Home \uc778\uc2a4\ud134\uc2a4\ub97c \uc124\uc815\ud574\uc8fc\uc138\uc694."
}
}
}

View File

@@ -23,8 +23,7 @@
"username": "Benotzernumm",
"verify_ssl": "AdGuard Home benotzt een eegenen Zertifikat"
},
"description": "Konfigur\u00e9iert \u00e4r AdGuard Home Instanz fir d'Iwwerwaachung an d'Kontroll z'erlaben.",
"title": "Verbannt \u00e4ren AdGuard Home"
"description": "Konfigur\u00e9iert \u00e4r AdGuard Home Instanz fir d'Iwwerwaachung an d'Kontroll z'erlaben."
}
}
}

View File

@@ -21,8 +21,7 @@
"username": "Gebruikersnaam",
"verify_ssl": "AdGuard Home maakt gebruik van een goed certificaat"
},
"description": "Stel uw AdGuard Home-instantie in om toezicht en controle mogelijk te maken.",
"title": "Link uw AdGuard Home."
"description": "Stel uw AdGuard Home-instantie in om toezicht en controle mogelijk te maken."
}
}
}

View File

@@ -21,8 +21,7 @@
"ssl": "AdGuard Hjem bruker et SSL-sertifikat",
"verify_ssl": "AdGuard Home bruker et riktig sertifikat"
},
"description": "Sett opp din AdGuard Hjem instans for \u00e5 tillate overv\u00e5king og kontroll.",
"title": "Koble til ditt AdGuard Hjem."
"description": "Sett opp din AdGuard Hjem instans for \u00e5 tillate overv\u00e5king og kontroll."
}
}
}

View File

@@ -7,7 +7,7 @@
"single_instance_allowed": "Dozwolona jest tylko jedna konfiguracja AdGuard Home."
},
"error": {
"connection_error": "[%key_id:common::config_flow::error::cannot_connect%]"
"connection_error": "Nie mo\u017cna nawi\u0105za\u0107 po\u0142\u0105czenia."
},
"step": {
"hassio_confirm": {
@@ -16,15 +16,14 @@
},
"user": {
"data": {
"host": "[%key_id:common::config_flow::data::host%]",
"password": "[%key_id:common::config_flow::data::password%]",
"port": "[%key_id:common::config_flow::data::port%]",
"host": "Nazwa hosta lub adres IP",
"password": "Has\u0142o",
"port": "Port",
"ssl": "AdGuard Home u\u017cywa certyfikatu SSL",
"username": "[%key_id:common::config_flow::data::username%]",
"username": "Nazwa u\u017cytkownika",
"verify_ssl": "AdGuard Home u\u017cywa odpowiedniego certyfikatu."
},
"description": "Skonfiguruj instancj\u0119 AdGuard Home, aby umo\u017cliwi\u0107 monitorowanie i kontrol\u0119.",
"title": "Po\u0142\u0105cz AdGuard Home"
"description": "Skonfiguruj instancj\u0119 AdGuard Home, aby umo\u017cliwi\u0107 monitorowanie i kontrol\u0119."
}
}
}

View File

@@ -19,8 +19,7 @@
"username": "Nome de usu\u00e1rio",
"verify_ssl": "O AdGuard Home usa um certificado apropriado"
},
"description": "Configure sua inst\u00e2ncia do AdGuard Home para permitir o monitoramento e o controle.",
"title": "Vincule o seu AdGuard Home."
"description": "Configure sua inst\u00e2ncia do AdGuard Home para permitir o monitoramento e o controle."
}
}
}

View File

@@ -3,6 +3,7 @@
"step": {
"user": {
"data": {
"host": "Servidor",
"password": "Palavra-passe",
"username": "Nome de Utilizador"
}

View File

@@ -23,8 +23,7 @@
"username": "\u041b\u043e\u0433\u0438\u043d",
"verify_ssl": "AdGuard Home \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442"
},
"description": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 Home Assistant \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f AdGuard Home.",
"title": "AdGuard Home"
"description": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 Home Assistant \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f AdGuard Home."
}
}
}

View File

@@ -23,8 +23,7 @@
"username": "Uporabni\u0161ko ime",
"verify_ssl": "AdGuard Home uporablja ustrezen certifikat"
},
"description": "Nastavite primerek AdGuard Home, da omogo\u010dite spremljanje in nadzor.",
"title": "Pove\u017eite svoj AdGuard Home."
"description": "Nastavite primerek AdGuard Home, da omogo\u010dite spremljanje in nadzor."
}
}
}

View File

@@ -21,8 +21,7 @@
"username": "Anv\u00e4ndarnamn",
"verify_ssl": "AdGuard Home anv\u00e4nder ett korrekt certifikat"
},
"description": "St\u00e4ll in din AdGuard Home-instans f\u00f6r att till\u00e5ta \u00f6vervakning och kontroll.",
"title": "L\u00e4nka din AdGuard Home."
"description": "St\u00e4ll in din AdGuard Home-instans f\u00f6r att till\u00e5ta \u00f6vervakning och kontroll."
}
}
}

View File

@@ -23,8 +23,7 @@
"username": "\u4f7f\u7528\u8005\u540d\u7a31",
"verify_ssl": "AdGuard Home \u4f7f\u7528\u5c0d\u61c9\u8a8d\u8b49"
},
"description": "\u8a2d\u5b9a AdGuard Home \u4ee5\u9032\u884c\u76e3\u63a7\u3002",
"title": "\u9023\u7d50 AdGuard Home\u3002"
"description": "\u8a2d\u5b9a AdGuard Home \u4ee5\u9032\u884c\u76e3\u63a7\u3002"
}
}
}

View File

@@ -23,13 +23,13 @@ class AgentFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
"""Initialize the Agent config flow."""
self.device_config = {}
async def async_step_user(self, info=None):
async def async_step_user(self, user_input=None):
"""Handle an Agent config flow."""
errors = {}
if info is not None:
host = info[CONF_HOST]
port = info[CONF_PORT]
if user_input is not None:
host = user_input[CONF_HOST]
port = user_input[CONF_PORT]
server_origin = generate_url(host, port)
agent_client = Agent(server_origin, async_get_clientsession(self.hass))
@@ -48,8 +48,8 @@ class AgentFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
self._abort_if_unique_id_configured(
updates={
CONF_HOST: info[CONF_HOST],
CONF_PORT: info[CONF_PORT],
CONF_HOST: user_input[CONF_HOST],
CONF_PORT: user_input[CONF_PORT],
SERVER_URL: server_origin,
}
)

View File

@@ -0,0 +1,21 @@
{
"config": {
"abort": {
"already_configured": "El dispositivo ya est\u00e1 configurado"
},
"error": {
"already_in_progress": "El flujo de configuraci\u00f3n para el dispositivo ya est\u00e1 en progreso.",
"device_unavailable": "El dispositivo no est\u00e1 disponible"
},
"step": {
"user": {
"data": {
"host": "Host",
"port": "Puerto"
},
"title": "Configurar Agent DVR"
}
}
},
"title": "Agent DVR"
}

View File

@@ -4,7 +4,7 @@
"already_configured": "El dispositivo ya est\u00e1 configurado"
},
"error": {
"already_in_progress": "La configuraci\u00f3n del flujo para el dispositivo ya est\u00e1 en marcha.",
"already_in_progress": "El flujo de configuraci\u00f3n para el dispositivo ya est\u00e1 en marcha.",
"device_unavailable": "El dispositivo no est\u00e1 disponible"
},
"step": {

View File

@@ -12,7 +12,8 @@
"data": {
"host": "H\u00f4te",
"port": "Port"
}
},
"title": "Configurer l'agent DVR"
}
}
},

View File

@@ -1,9 +1,9 @@
{
"config": {
"step": {
"manual_confirm": {
"user": {
"data": {
"host": "Host",
"host": "Hoszt",
"port": "Port"
}
}

View File

@@ -1,7 +1,7 @@
{
"config": {
"abort": {
"already_configured": "[%key_id:common::config_flow::abort::already_configured_device%]"
"already_configured": "Urz\u0105dzenie jest ju\u017c skonfigurowane."
},
"error": {
"already_in_progress": "Konfiguracja urz\u0105dzenia jest ju\u017c w toku.",
@@ -10,8 +10,8 @@
"step": {
"user": {
"data": {
"host": "[%key_id:common::config_flow::data::host%]",
"port": "[%key_id:common::config_flow::data::port%]"
"host": "Nazwa hosta lub adres IP",
"port": "Port"
},
"title": "Konfiguracja Agent DVR"
}

View File

@@ -0,0 +1,7 @@
{
"config": {
"error": {
"device_unavailable": "O dispositivo n\u00e3o est\u00e1 dispon\u00edvel"
}
}
}

View File

@@ -3,7 +3,7 @@
"step": {
"user": {
"data": {
"access_token": "Vert"
"host": "Servidor"
}
}
}

View File

@@ -10,7 +10,7 @@
"step": {
"user": {
"data": {
"api_key": "Clau API d'Airly",
"api_key": "Clau API",
"latitude": "Latitud",
"longitude": "Longitud",
"name": "Nom de la integraci\u00f3"

View File

@@ -10,7 +10,7 @@
"step": {
"user": {
"data": {
"api_key": "Airly API-Schl\u00fcssel",
"api_key": "API-Schl\u00fcssel",
"latitude": "Breitengrad",
"longitude": "L\u00e4ngengrad",
"name": "Name der Integration"

View File

@@ -10,7 +10,7 @@
"step": {
"user": {
"data": {
"api_key": "Airly API kulcs",
"api_key": "API kulcs",
"latitude": "Sz\u00e9less\u00e9g",
"longitude": "Hossz\u00fas\u00e1g",
"name": "Az integr\u00e1ci\u00f3 neve"

View File

@@ -10,7 +10,7 @@
"step": {
"user": {
"data": {
"api_key": "Chiave API Airly",
"api_key": "Chiave API",
"latitude": "Latitudine",
"longitude": "Logitudine",
"name": "Nome dell'integrazione"

View File

@@ -10,7 +10,7 @@
"step": {
"user": {
"data": {
"api_key": "Airly API Schl\u00ebssel",
"api_key": "API Schl\u00ebssel",
"latitude": "Breedegrad",
"longitude": "L\u00e4ngegrad",
"name": "Numm vun der Installatioun"

View File

@@ -10,7 +10,7 @@
"step": {
"user": {
"data": {
"api_key": "Airly API-n\u00f8kkel",
"api_key": "API-n\u00f8kkel",
"latitude": "Breddegrad",
"longitude": "Lengdegrad",
"name": "Navn p\u00e5 integrasjonen"

View File

@@ -10,7 +10,7 @@
"step": {
"user": {
"data": {
"api_key": "[%key_id:common::config_flow::data::api_key%] Airly",
"api_key": "Klucz API",
"latitude": "Szeroko\u015b\u0107 geograficzna",
"longitude": "D\u0142ugo\u015b\u0107 geograficzna",
"name": "Nazwa integracji"

View File

@@ -3,6 +3,7 @@
"step": {
"user": {
"data": {
"api_key": "",
"latitude": "Latitude",
"longitude": "Longitude"
},

View File

@@ -1,6 +1,7 @@
"""The airvisual component."""
import asyncio
from datetime import timedelta
from math import ceil
from pyairvisual import Client
from pyairvisual.errors import AirVisualError, NodeProError
@@ -37,8 +38,7 @@ from .const import (
PLATFORMS = ["air_quality", "sensor"]
DEFAULT_ATTRIBUTION = "Data provided by AirVisual"
DEFAULT_GEOGRAPHY_SCAN_INTERVAL = timedelta(minutes=10)
DEFAULT_NODE_PRO_SCAN_INTERVAL = timedelta(minutes=1)
DEFAULT_NODE_PRO_UPDATE_INTERVAL = timedelta(minutes=1)
DEFAULT_OPTIONS = {CONF_SHOW_ON_MAP: True}
GEOGRAPHY_COORDINATES_SCHEMA = vol.Schema(
@@ -88,6 +88,53 @@ def async_get_geography_id(geography_dict):
)
@callback
def async_get_cloud_api_update_interval(hass, api_key):
"""Get a leveled scan interval for a particular cloud API key.
This will shift based on the number of active consumers, thus keeping the user
under the monthly API limit.
"""
num_consumers = len(async_get_cloud_coordinators_by_api_key(hass, api_key))
# Assuming 10,000 calls per month and a "smallest possible month" of 28 days; note
# that we give a buffer of 1500 API calls for any drift, restarts, etc.:
minutes_between_api_calls = ceil(1 / (8500 / 28 / 24 / 60 / num_consumers))
LOGGER.debug(
"Leveling API key usage (%s): %s consumers, %s minutes between updates",
api_key,
num_consumers,
minutes_between_api_calls,
)
return timedelta(minutes=minutes_between_api_calls)
@callback
def async_get_cloud_coordinators_by_api_key(hass, api_key):
"""Get all DataUpdateCoordinator objects related to a particular API key."""
coordinators = []
for entry_id, coordinator in hass.data[DOMAIN][DATA_COORDINATOR].items():
config_entry = hass.config_entries.async_get_entry(entry_id)
if config_entry.data.get(CONF_API_KEY) == api_key:
coordinators.append(coordinator)
return coordinators
@callback
def async_sync_geo_coordinator_update_intervals(hass, api_key):
"""Sync the update interval for geography-based data coordinators (by API key)."""
update_interval = async_get_cloud_api_update_interval(hass, api_key)
for coordinator in async_get_cloud_coordinators_by_api_key(hass, api_key):
LOGGER.debug(
"Updating interval for coordinator: %s, %s",
coordinator.name,
update_interval,
)
coordinator.update_interval = update_interval
async def async_setup(hass, config):
"""Set up the AirVisual component."""
hass.data[DOMAIN] = {DATA_COORDINATOR: {}}
@@ -184,11 +231,20 @@ async def async_setup_entry(hass, config_entry):
coordinator = DataUpdateCoordinator(
hass,
LOGGER,
name="geography data",
update_interval=DEFAULT_GEOGRAPHY_SCAN_INTERVAL,
name=async_get_geography_id(config_entry.data),
# We give a placeholder update interval in order to create the coordinator;
# then, below, we use the coordinator's presence (along with any other
# coordinators using the same API key) to calculate an actual, leveled
# update interval:
update_interval=timedelta(minutes=5),
update_method=async_update_data,
)
hass.data[DOMAIN][DATA_COORDINATOR][config_entry.entry_id] = coordinator
async_sync_geo_coordinator_update_intervals(
hass, config_entry.data[CONF_API_KEY]
)
# Only geography-based entries have options:
config_entry.add_update_listener(async_update_options)
else:
@@ -212,13 +268,13 @@ async def async_setup_entry(hass, config_entry):
hass,
LOGGER,
name="Node/Pro data",
update_interval=DEFAULT_NODE_PRO_SCAN_INTERVAL,
update_interval=DEFAULT_NODE_PRO_UPDATE_INTERVAL,
update_method=async_update_data,
)
await coordinator.async_refresh()
hass.data[DOMAIN][DATA_COORDINATOR][config_entry.entry_id] = coordinator
hass.data[DOMAIN][DATA_COORDINATOR][config_entry.entry_id] = coordinator
await coordinator.async_refresh()
for component in PLATFORMS:
hass.async_create_task(
@@ -278,6 +334,12 @@ async def async_unload_entry(hass, config_entry):
)
if unload_ok:
hass.data[DOMAIN][DATA_COORDINATOR].pop(config_entry.entry_id)
if config_entry.data[CONF_INTEGRATION_TYPE] == INTEGRATION_TYPE_GEOGRAPHY:
# Re-calculate the update interval period for any remaining consumes of this
# API key:
async_sync_geo_coordinator_update_intervals(
hass, config_entry.data[CONF_API_KEY]
)
return unload_ok
@@ -313,6 +375,11 @@ class AirVisualEntity(Entity):
"""Return the icon."""
return self._icon
@property
def should_poll(self) -> bool:
"""Disable polling."""
return False
@property
def unit_of_measurement(self):
"""Return the unit the value is expressed in."""

View File

@@ -8,7 +8,7 @@ from .const import (
CONF_INTEGRATION_TYPE,
DATA_COORDINATOR,
DOMAIN,
INTEGRATION_TYPE_GEOGRAPHY,
INTEGRATION_TYPE_NODE_PRO,
)
ATTR_HUMIDITY = "humidity"
@@ -18,12 +18,12 @@ ATTR_VOC = "voc"
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up AirVisual air quality entities based on a config entry."""
coordinator = hass.data[DOMAIN][DATA_COORDINATOR][config_entry.entry_id]
# Geography-based AirVisual integrations don't utilize this platform:
if config_entry.data[CONF_INTEGRATION_TYPE] == INTEGRATION_TYPE_GEOGRAPHY:
if config_entry.data[CONF_INTEGRATION_TYPE] != INTEGRATION_TYPE_NODE_PRO:
return
coordinator = hass.data[DOMAIN][DATA_COORDINATOR][config_entry.entry_id]
async_add_entities([AirVisualNodeProSensor(coordinator)], True)

View File

@@ -1,7 +1,7 @@
{
"config": {
"abort": {
"already_configured": "Aquesta clau API ja est\u00e0 sent utilitzada."
"already_configured": "Aquestes coordenades o Node/Pro ID ja estan registrades."
},
"error": {
"general_error": "S'ha produ\u00eft un error desconegut.",
@@ -21,21 +21,18 @@
"node_pro": {
"data": {
"ip_address": "Adre\u00e7a IP o amfitri\u00f3 de la unitat",
"password": "Contrasenya de la unitat"
"password": "Contrasenya"
},
"description": "Monitoritza una unitat personal d'AirVisual. Pots obtenir la contrasenya des de la interf\u00edcie d'usuari (UI) de la unitat.",
"title": "Configuraci\u00f3 d'AirVisual Node/Pro"
},
"user": {
"data": {
"api_key": "Clau API",
"cloud_api": "Ubicaci\u00f3 geogr\u00e0fica",
"latitude": "Latitud",
"longitude": "Longitud",
"node_pro": "AirVisual Node Pro",
"type": "Tipus d'integraci\u00f3"
},
"description": "Monitoritzaci\u00f3 de la qualitat de l'aire per ubicaci\u00f3 geogr\u00e0fica.",
"description": "Tria quin tipus de dades d'AirVisual vols monitoritzar.",
"title": "Configura AirVisual"
}
}
@@ -46,7 +43,6 @@
"data": {
"show_on_map": "Mostra al mapa l'\u00e0rea geogr\u00e0fica monitoritzada"
},
"description": "Estableix les diferents opcions de la integraci\u00f3 AirVisual.",
"title": "Configuraci\u00f3 d'AirVisual"
}
}

View File

@@ -20,17 +20,14 @@
"node_pro": {
"data": {
"ip_address": "IP-Adresse/Hostname des Ger\u00e4ts",
"password": "Ger\u00e4tekennwort"
"password": "Passwort"
},
"description": "\u00dcberwachen Sie eine pers\u00f6nliche AirVisual-Einheit. Das Passwort kann von der Benutzeroberfl\u00e4che des Ger\u00e4ts abgerufen werden.",
"title": "Konfigurieren Sie einen AirVisual Node/Pro"
},
"user": {
"data": {
"api_key": "API-Schl\u00fcssel",
"cloud_api": "Geografische Position",
"latitude": "Breitengrad",
"longitude": "L\u00e4ngengrad",
"node_pro": "AirVisual Node Pro",
"type": "Integrationstyp"
},
@@ -45,7 +42,6 @@
"data": {
"show_on_map": "Zeigen Sie die \u00fcberwachte Geografie auf der Karte an"
},
"description": "Legen Sie verschiedene Optionen f\u00fcr die AirVisual-Integration fest.",
"title": "Konfigurieren Sie AirVisual"
}
}

View File

@@ -28,10 +28,7 @@
},
"user": {
"data": {
"api_key": "API Key",
"cloud_api": "Geographical Location",
"latitude": "Latitude",
"longitude": "Longitude",
"node_pro": "AirVisual Node Pro",
"type": "Integration Type"
},
@@ -46,7 +43,6 @@
"data": {
"show_on_map": "Show monitored geography on the map"
},
"description": "Set various options for the AirVisual integration.",
"title": "Configure AirVisual"
}
}

View File

@@ -5,11 +5,13 @@
},
"error": {
"general_error": "Se ha producido un error desconocido.",
"invalid_api_key": "Se proporciona una clave de API no v\u00e1lida.",
"unable_to_connect": "No se puede conectar a la unidad Node/Pro."
},
"step": {
"geography": {
"data": {
"api_key": "Clave API",
"latitude": "Latitud",
"longitude": "Longitud"
},
@@ -26,10 +28,7 @@
},
"user": {
"data": {
"api_key": "Clave API",
"cloud_api": "Localizaci\u00f3n geogr\u00e1fica",
"latitude": "Latitud",
"longitude": "Longitud",
"node_pro": "AirVisual Node Pro",
"type": "Tipo de integraci\u00f3n"
},
@@ -44,7 +43,6 @@
"data": {
"show_on_map": "Mostrar geograf\u00eda monitoreada en el mapa"
},
"description": "Establezca varias opciones para la integraci\u00f3n de AirVisual.",
"title": "Configurar AirVisual"
}
}

View File

@@ -21,21 +21,18 @@
"node_pro": {
"data": {
"ip_address": "Direcci\u00f3n IP/Nombre de host de la Unidad",
"password": "Contrase\u00f1a de la Unidad"
"password": "Contrase\u00f1a"
},
"description": "Monitorizar una unidad personal AirVisual. La contrase\u00f1a puede ser recuperada desde la interfaz de la unidad.",
"title": "Configurar un AirVisual Node/Pro"
},
"user": {
"data": {
"api_key": "Clave API",
"cloud_api": "Ubicaci\u00f3n Geogr\u00e1fica",
"latitude": "Latitud",
"longitude": "Longitud",
"node_pro": "AirVisual Node Pro",
"type": "Tipo de Integraci\u00f3n"
},
"description": "Elige qu\u00e9 tipo de datos de AirVisual quieres monitorear.",
"description": "Elige qu\u00e9 tipo de datos de AirVisual quieres monitorizar.",
"title": "Configurar AirVisual"
}
}
@@ -46,7 +43,6 @@
"data": {
"show_on_map": "Mostrar geograf\u00eda monitorizada en el mapa"
},
"description": "Ajustar varias opciones para la integraci\u00f3n de AirVisual.",
"title": "Configurar AirVisual"
}
}

View File

@@ -28,10 +28,7 @@
},
"user": {
"data": {
"api_key": "Cl\u00e9 API",
"cloud_api": "Localisation g\u00e9ographique",
"latitude": "Latitude",
"longitude": "Longitude",
"node_pro": "AirVisual Node Pro",
"type": "Type d'int\u00e9gration"
},
@@ -46,7 +43,6 @@
"data": {
"show_on_map": "Afficher la g\u00e9ographie surveill\u00e9e sur la carte"
},
"description": "D\u00e9finissez diverses options pour l'int\u00e9gration d'AirVisual.",
"title": "Configurer AirVisual"
}
}

View File

@@ -6,10 +6,15 @@
"step": {
"geography": {
"data": {
"api_key": "API Kulcs",
"api_key": "API kulcs",
"latitude": "Sz\u00e9less\u00e9g",
"longitude": "Hossz\u00fas\u00e1g"
}
},
"node_pro": {
"data": {
"password": "Jelsz\u00f3"
}
}
}
}

View File

@@ -21,17 +21,14 @@
"node_pro": {
"data": {
"ip_address": "Indirizzo IP/Nome host dell'unit\u00e0",
"password": "Password dell'unit\u00e0"
"password": "Password"
},
"description": "Monitorare un'unit\u00e0 AirVisual personale. La password pu\u00f2 essere recuperata dall'interfaccia utente dell'unit\u00e0.",
"title": "Configurare un AirVisual Node/Pro"
},
"user": {
"data": {
"api_key": "Chiave API",
"cloud_api": "Posizione geografica",
"latitude": "Latitudine",
"longitude": "Logitudine",
"node_pro": "AirVisual Node Pro",
"type": "Tipo di integrazione"
},
@@ -46,7 +43,6 @@
"data": {
"show_on_map": "Mostra l'area geografica monitorata sulla mappa"
},
"description": "Impostare varie opzioni per l'integrazione AirVisual.",
"title": "Configurare AirVisual"
}
}

View File

@@ -28,10 +28,7 @@
},
"user": {
"data": {
"api_key": "API \ud0a4",
"cloud_api": "\uc9c0\ub9ac\uc801 \uc704\uce58",
"latitude": "\uc704\ub3c4",
"longitude": "\uacbd\ub3c4",
"node_pro": "AirVisual Node Pro",
"type": "\uc5f0\ub3d9 \uc720\ud615"
},
@@ -46,7 +43,6 @@
"data": {
"show_on_map": "\uc9c0\ub3c4\uc5d0 \ubaa8\ub2c8\ud130\ub9c1\ub41c \uc9c0\ub9ac \uc815\ubcf4 \ud45c\uc2dc"
},
"description": "AirVisual \ud1b5\ud569 \uad6c\uc131\uc694\uc18c\uc5d0 \ub300\ud55c \ub2e4\uc591\ud55c \uc635\uc158\uc744 \uc124\uc815\ud574\uc8fc\uc138\uc694.",
"title": "AirVisual \uad6c\uc131\ud558\uae30"
}
}

View File

@@ -21,21 +21,18 @@
"node_pro": {
"data": {
"ip_address": "IP Adresse / Numm vun der Unit\u00e9it",
"password": "Passwuert vun der Unit\u00e9it"
"password": "Passwuert"
},
"description": "Pers\u00e9inlech Airvisual Unit\u00e9it iwwerwaachen. Passwuert kann vum UI vum Apparat ausgelies ginn.",
"title": "Airvisual Node/Pro ariichten"
},
"user": {
"data": {
"api_key": "API Schl\u00ebssel",
"cloud_api": "Geografesche Standuert",
"latitude": "Breedegrad",
"longitude": "L\u00e4ngegrad",
"node_pro": "Airvisual Node Pro",
"type": "Typ vun der Integratioun"
},
"description": "Loft Qualit\u00e9it an enger geografescher Lag iwwerwaachen.",
"description": "Typ vun Airvisual Donn\u00e9\u00eb fir d'Iwwerwachung auswielen.",
"title": "AirVisual konfigur\u00e9ieren"
}
}
@@ -46,7 +43,6 @@
"data": {
"show_on_map": "Iwwerwaachte Geografie op der Kaart uweisen"
},
"description": "Verschidden Optioune fir d'AirVisual Integratioun d\u00e9fin\u00e9ieren.",
"title": "Airvisual ariichten"
}
}

View File

@@ -26,10 +26,7 @@
},
"user": {
"data": {
"api_key": "API-sleutel",
"cloud_api": "Geografische ligging",
"latitude": "Breedtegraad",
"longitude": "Lengtegraad",
"node_pro": "AirVisual Node Pro",
"type": "Integratietype"
},
@@ -44,7 +41,6 @@
"data": {
"show_on_map": "Toon gecontroleerde geografie op de kaart"
},
"description": "Stel verschillende opties in voor de AirVisual-integratie.",
"title": "Configureer AirVisual"
}
}

View File

@@ -21,17 +21,14 @@
"node_pro": {
"data": {
"ip_address": "Enhetens IP-adresse / vertsnavn",
"password": "Passord for enhet"
"password": "Passord"
},
"description": "Overv\u00e5ke en personlig AirVisual-enhet. Passordet kan hentes fra enhetens brukergrensesnitt.",
"title": "Konfigurer en AirVisual Node / Pro"
},
"user": {
"data": {
"api_key": "API-n\u00f8kkel",
"cloud_api": "Geografisk plassering",
"latitude": "Breddegrad",
"longitude": "Lengdegrad",
"node_pro": "",
"type": "Integrasjonstype"
},
@@ -46,7 +43,6 @@
"data": {
"show_on_map": "Vis overv\u00e5ket geografi p\u00e5 kartet"
},
"description": "Angi forskjellige alternativer for AirVisual-integrasjonen.",
"title": "Konfigurer AirVisual"
}
}

View File

@@ -4,14 +4,14 @@
"already_configured": "Ten klucz API jest ju\u017c w u\u017cyciu."
},
"error": {
"general_error": "[%key_id:common::config_flow::error::unknown%]",
"general_error": "Nieoczekiwany b\u0142\u0105d.",
"invalid_api_key": "Nieprawid\u0142owy klucz API.",
"unable_to_connect": "Nie mo\u017cna po\u0142\u0105czy\u0107 si\u0119 z jednostk\u0105 Node/Pro."
},
"step": {
"geography": {
"data": {
"api_key": "[%key_id:common::config_flow::data::api_key%]",
"api_key": "Klucz API",
"latitude": "Szeroko\u015b\u0107 geograficzna",
"longitude": "D\u0142ugo\u015b\u0107 geograficzna"
},
@@ -20,18 +20,15 @@
},
"node_pro": {
"data": {
"ip_address": "[%key_id:common::config_flow::data::host%]",
"password": "[%key_id:common::config_flow::data::password%] jednostki"
"ip_address": "Nazwa hosta lub adres IP",
"password": "Has\u0142o"
},
"description": "Monitoruj jednostk\u0119 AirVisual. Has\u0142o mo\u017cna odzyska\u0107 z interfejsu u\u017cytkownika urz\u0105dzenia.",
"title": "Konfiguracja AirVisual Node/Pro"
},
"user": {
"data": {
"api_key": "[%key_id:common::config_flow::data::api_key%]",
"cloud_api": "Lokalizacja geograficzna",
"latitude": "Szeroko\u015b\u0107 geograficzna",
"longitude": "D\u0142ugo\u015b\u0107 geograficzna",
"node_pro": "AirVisual Node Pro",
"type": "Typ integracji"
},
@@ -46,7 +43,6 @@
"data": {
"show_on_map": "Wy\u015bwietlaj encje na mapie"
},
"description": "Konfiguracja opcji integracji AirVisual.",
"title": "Konfiguracja AirVisual"
}
}

View File

@@ -0,0 +1,21 @@
{
"config": {
"error": {
"general_error": "Ocorreu um erro desconhecido.",
"invalid_api_key": "Chave de API fornecida \u00e9 inv\u00e1lida."
},
"step": {
"geography": {
"data": {
"latitude": "Latitude",
"longitude": "Longitude"
}
},
"user": {
"data": {
"type": "Tipo de Integra\u00e7\u00e3o"
}
}
}
}
}

View File

@@ -28,10 +28,7 @@
},
"user": {
"data": {
"api_key": "\u041a\u043b\u044e\u0447 API",
"cloud_api": "\u041c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435",
"latitude": "\u0428\u0438\u0440\u043e\u0442\u0430",
"longitude": "\u0414\u043e\u043b\u0433\u043e\u0442\u0430",
"node_pro": "AirVisual Node Pro",
"type": "\u0422\u0438\u043f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438"
},
@@ -46,7 +43,6 @@
"data": {
"show_on_map": "\u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u043c\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043d\u0430 \u043a\u0430\u0440\u0442\u0435"
},
"description": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 AirVisual.",
"title": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 AirVisual"
}
}

View File

@@ -1,12 +0,0 @@
{
"config": {
"step": {
"user": {
"data": {
"latitude": "Zemepisn\u00e1 \u0161\u00edrka",
"longitude": "Zemepisn\u00e1 d\u013a\u017eka"
}
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More