Commit Graph

28657 Commits (3d308e0599a4c968bf19853ff6e33302f6cc623a)

Author SHA1 Message Date
Markus Haack 3d308e0599
Add SolarEdge battery level and dynamic icon for storage sensor (#37826)
* Add SolarEdge battery level and dynamic icon for storage sensor

* Add SolarEdge battery storage sensor

* Fix isort warning

* Remove charging attribute

* Fix isort warning

* Apply suggestions from code review

* Update homeassistant/components/solaredge/sensor.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-08-09 16:28:45 -05:00
Michaël Arnauts d7d7ee6524
Use global CONF_UNIQUE_ID for mqtt (#38595)
* Use global CONF_UNIQUE_ID for mqtt

* Update __init__.py

* Update __init__.py

* Update __init__.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-08-09 16:00:14 -05:00
Arto Jantunen abb81704d2
Add support for boost and eco modes to Daikin climate (#37282)
Daikin calls these 'econo' and 'powerful', but the result is the same..
2020-08-09 15:48:38 -05:00
Alex Ward feb36c3efc
Persist hive light brightness for color change (#38677)
when changing the color for a hive light, keep the brightness at the
previous level.

Co-authored-by: Adam Charlton <ad5665@live.co.uk>

Co-authored-by: Adam Charlton <ad5665@live.co.uk>
2020-08-09 15:15:25 -05:00
Michaël Arnauts 3761942b82
Use global CONF_UNIQUE_ID for deconz (#38597) 2020-08-09 13:21:11 -05:00
Michaël Arnauts 2ba4c1193c
Use global CONF_UNIQUE_ID for hue (#38596) 2020-08-09 13:20:11 -05:00
Vaclav b258e757c2
Add DataUpdateCoordinator to met integration (#38405)
* Add DataUpdateCoordinator to met integration

* isort

* redundant fetch_data

* Update homeassistant/components/met/weather.py

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

* Update homeassistant/components/met/weather.py

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

* Update homeassistant/components/met/__init__.py

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

* Update homeassistant/components/met/__init__.py

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

* Update homeassistant/components/met/__init__.py

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

* Update homeassistant/components/met/__init__.py

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

* Update homeassistant/components/met/weather.py

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

* Update homeassistant/components/met/__init__.py

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

* Update homeassistant/components/met/__init__.py

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

* Update homeassistant/components/met/__init__.py

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

* Update homeassistant/components/met/__init__.py

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

* Update homeassistant/components/met/__init__.py

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

* Update homeassistant/components/met/weather.py

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

* Update homeassistant/components/met/weather.py

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

* fix black, isort, flake8, hassfest, mypy

* remove unused async_setup method

* replace fetch_data by coordinator request_refresh

* remove redundant  async_update

* track_home

* Apply suggestions from code review

* Apply suggestions from code review

* Update homeassistant/components/met/__init__.py

* Apply suggestions from code review

* Update homeassistant/components/met/__init__.py

* Apply suggestions from code review

* Update homeassistant/components/met/__init__.py

* Apply suggestions from code review

* Update test_config_flow.py

* Apply suggestions from code review

* Apply suggestions from code review

* Update __init__.py

* Create test_init.py

* Update homeassistant/components/met/__init__.py

* Update __init__.py

* Update __init__.py

* Update homeassistant/components/met/__init__.py

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

* Add tests for NightScout integration

* Fix Nightscout captalization

* Change quality scale for Nightscout

* Trigger actions

* Add missing tests

* Fix stale comments

* Fix Nightscout manufacturer

* Add entry type service

* Change host to URL on nightscout config flow

* Add ConfigEntryNotReady exception to nighscout init

* Remote platform_schema from nightscout sensor

* Update homeassistant/components/nightscout/config_flow.py

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

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

* Apply suggestions from code review

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

* Minor post-review tweaks

* Apply suggestions from code review

* Update homeassistant/components/coolmaster/__init__.py

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

* Forgot to fix the for loop

* Remove leftover return

* Guard the for loop

* Changed from if to else

* Fixed list iteration for validating input

* Adjusted per linter
2020-08-09 19:05:26 +02:00
Ian Duffy ef039d6a65
Fix Kodi play_media media type casing (#38665)
* [KODI] Fix casing issue

Alexa and the Services UI on HA feeds in a media type of "channel" for media type.
The Kodi code looks for a "CHANNEL" instead, as a result the functionality fails.

* Update homeassistant/components/kodi/media_player.py

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

* Update homeassistant/components/kodi/media_player.py

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

* Update homeassistant/components/kodi/media_player.py

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

* Update homeassistant/components/kodi/media_player.py

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

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-08-09 11:25:22 -05:00
Eugenio Panadero f526deaa87
Bump version of aiopvpc to v2.0.2 (#38691) 2020-08-09 11:23:49 -05:00
Maciej Bieniek a7e19c8896
Improve tests for AccuWeather integration (#38621)
* Add more tests

* Add tests for sensor platform

* Add more tests

* More tests

* Simplify parsing of attributes

* Change Quality scale to platinum

* Patch the library in the manual update entity test

* Add unsupported condition icon test

* Do not patch _async_get_data

* Apply suggestions from code review

* Update config_flow.py

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

* Update tests/components/accuweather/test_weather.py

* Apply suggestions from code review

* Add return_value

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-08-09 09:21:36 -05:00
Alan Tse ca3842b150
Address requested code changes in Tesla (#38680)
* Address requested code changes

* Address ternary operator in sensor
2020-08-09 09:16:39 -05:00
Paulus Schoutsen ac1f431f91
Bump updater timeout (#38690) 2020-08-09 14:10:27 +02:00
Franck Nijhof 20710d8605
Add current request context to get_url helper (#38602) 2020-08-09 14:07:31 +02:00
Justin Paupore 53b729a0d1
Support muting and relative-volume media_players in Google Assistant (#38651)
Support the action.devices.commands.mute intent to mute and unmute
media_players that declare support for mute/unmute.

For media players with support for volume up/down, but no support for
setting the volume to a specific number, allow use of the
action.devices.commands.relativeMute intent to control volume up/down.
This will improve support for IR blasters and other open-loop
media_player integrations.
2020-08-09 14:03:53 +02:00
J. Nick Koston a6f869aeee
Improve performance of fetching the state domain (#38653)
Pre calc domain when an entity id created to avoid
having to call the property method which had to call
split_entity_id every time. If there are a lot of
zone related automations, async_active_zone can call
async_entity_ids frequently which results in 100000s
of split_entity_id via the domain property every
second.
2020-08-09 13:45:16 +02:00
J. Nick Koston ef8e74786f
Support extracting entities by domain from templates (#38647) 2020-08-09 13:44:09 +02:00
J. Nick Koston d659502e35
Update aiohomekit to handle homekit devices that do not send format (#38679) 2020-08-09 13:29:46 +02:00
On Freund f0487b783d
Bump pyvolumio to 0.1.1 (#38685) 2020-08-09 00:02:21 -05:00
Aaron Bach 6856735a1d
Fix missing data for Guardian "AP enabled" binary sensor (#38681) 2020-08-08 21:00:55 -06:00
Thomas Hollstegge 5de21375c0
Make sure groups are initialized before template sensors (#37766)
* Make sure groups are initialized before template sensors

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

Fixes #35872

* Patch async_setup_platform instead of async_setup

* Cleanup

* Use an event to avoid sleep

* Update tests/components/template/test_sensor.py

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

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

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

* Add support for exposing light effects via Google Assistant

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

(cherry picked from commit 2409fe19ed43bef568a0cca826652867d3a2d71a)

* upadte power factor unit (%)

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

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

* Actually add the tests

* collapse branch

* Update homeassistant/config_entries.py

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

* handle entries that lack the ability to reload

* reduce

* adjust konnected tests

* update axis tests

* fix blocking

* more mocking

* config flow tests outside of test_config_flow

* reduce

* volumio

* Update homeassistant/config_entries.py

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

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

* get rid of copy

* revert test change

Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-08-08 13:23:56 -05:00
Joakim Sørensen 1cb161017e
Update frontend to 20200807.1 (#38626) 2020-08-08 20:00:56 +02:00
michaeldavie 9169d73c71
Bump env_canada to 0.2.0 (#37467) 2020-08-08 16:34:24 +02:00
Bas Nijholt 21e551b61d
Bump pre-commit-hooks from v2.40 to v3.2.0 (#38664) 2020-08-08 15:01:57 +02:00
Bas Nijholt 0427d87ba4
Bump codespell from v1.16.0 to v1.17.1 and fix new spelling errors (#38663) 2020-08-08 14:41:02 +02:00
starkillerOG da89fa7884
Fix xiaomi_aqara discovery (#38622) 2020-08-08 13:59:53 +02:00
Bas Nijholt e258ab7ff0
Bump yamllint to v1.24.2 (#38633) 2020-08-08 13:18:37 +02:00
Bas Nijholt d49c55a8da
Bump pyupgrade to v2.7.2 (#38629) 2020-08-08 12:36:12 +02:00
Alejandro Rivera 937b951727
Fix rest_command UnboundLocalError in exception handling (#38656)
```
2020-08-07 22:38:10 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.3903193064] local variable 'response' referenced before assignment
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/rest_command/__init__.py", line 115, in async_service_handler
    async with getattr(websession, method)(
  File "/usr/local/lib/python3.8/site-packages/aiohttp/client.py", line 1012, in __aenter__
    self._resp = await self._coro
  File "/usr/local/lib/python3.8/site-packages/aiohttp/client.py", line 582, in _request
    break
  File "/usr/local/lib/python3.8/site-packages/aiohttp/helpers.py", line 586, in __exit__
    raise asyncio.TimeoutError from None
asyncio.exceptions.TimeoutError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 125, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1281, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1316, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/components/rest_command/__init__.py", line 137, in async_service_handler
    _LOGGER.warning("Timeout call %s", response.url, exc_info=1)
UnboundLocalError: local variable 'response' referenced before assignment
```
2020-08-08 10:56:39 +02:00
Chris Talkington f8570438e9
Fix AccuWeather async timeout (#38654) 2020-08-07 23:50:08 -05:00
Alan Tse c3e77487da
Bump teslajsonpy to 0.10.4 (#38652) 2020-08-07 22:58:31 -05:00
Alan Tse 94b6d09b51
Update Tesla to use DataUpdateCoordinator (#38306)
* Update Tesla to use DataUpdateCoordinator

* Update Tesla to use DataUpdateCoordinator

* Fix linting errors

* Apply suggestions from code review

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

* Address requested changes

* Apply suggestions from code review

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

* Fix lint errors

* Remove controller from hass.data

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-08-07 22:16:28 -05:00
Raman Gupta 0d5e279509
Standardize Vizio update service schema (#38636)
* update voluptuous schema to match standards and to handle data transformations

* improve test
2020-08-07 21:29:54 -05:00
Eugene Prystupa 50cd6be18d
Raise error when unsupported (old) Bond firmware is detected (#38650) 2020-08-07 21:22:13 -05:00
Aaron Bach 4cceb4ad0a
Bump regenmaschine to 2.1.0 (#38649) 2020-08-07 18:01:55 -06:00
Vaarlion 353817337e
Automatically switch mpd between resume and start playing on media_play (#37854)
* Automatically switch between resume and start playing

* Fix Black issue

Weirdly when i run it i had an error `1544 files left unchanged, 3313 files failed to reformat.`
I didn't watch the commit check output afterward.
2020-08-07 22:28:49 +02:00
James Hilliard 3e9f2b8246
Remove unused async_setup_platform from HLK-SW16 switch (#38648) 2020-08-07 15:18:31 -05:00
Ole-Martin Heggen 2d70df9776
Fix url in seventeentrack delivered notification (#38646) 2020-08-07 14:14:42 -06:00
Franck Nijhof 94fd6cceef
Remove tf-models-official from wheels builder (#38637) 2020-08-07 17:37:31 +02:00
Franck Nijhof fa956e3153
Bump version to 0.115.0dev0 (#38606) 2020-08-07 11:41:26 +02:00
Paulus Schoutsen 93e1f6176a Fix lint 2020-08-07 08:40:50 +00:00
cgtobi 6930aebea2
Switch Netatmo integration to dispatcher for internal communication (#38590)
* Switch to dispatcher for internal communication

* Fix method call

* Update homeassistant/components/netatmo/camera.py

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

* Update homeassistant/components/netatmo/camera.py

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

* Update homeassistant/components/netatmo/climate.py

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

* Update homeassistant/components/netatmo/climate.py

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

* Rename variables

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-08-07 09:25:59 +02:00
Jason Hunter 3546a82cfb
Upgrade to TensorFlow 2 (#38384)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2020-08-07 08:56:28 +02:00
J. Nick Koston 7e34c2582f
Ensure doorbird does not block startup (#38619) 2020-08-07 08:40:28 +02:00