Commit Graph

22397 Commits (d89bfe79f9f081ff8eb55e5b8d90aa2b0a025edd)

Author SHA1 Message Date
Chris Talkington d89bfe79f9
Allow device class to control icons for tesla (#37526) 2020-08-05 02:00:05 +02:00
Janis Jansons 17c9e31e2c
Fix Mikrotik encoding by setting utf8 (#38091) 2020-08-05 01:39:55 +02:00
tizzen33 2d7b9326ee
Add new Water Meter Sensor for Toon (#37879)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2020-08-05 01:02:19 +02:00
Daniel Hjelseth Høyer e53d770b3d
Update pymetno lib, and start using met api v2 (#38547) 2020-08-05 00:31:12 +02:00
Franck Nijhof 1e32d0e2b9
Upgrade toonapi to v0.2.0 (#38543) 2020-08-04 23:42:53 +02:00
Peter Nijssen ab512a1273
Add spider config flow (#36001) 2020-08-04 22:37:20 +02:00
lawtancool 96c6e4c2f4
Fix Control4 token refresh (#38302) 2020-08-04 21:35:28 +02:00
J. Nick Koston e208d8b93e
Move system log processing out of the event loop (#38445) 2020-08-04 21:21:45 +02:00
cgtobi 31dbdff3c4
Add Netatmo data handler (#35571)
* Fix webhook registration

* Only load camera platform with valid scope

* Add initial data handler and netatmo base class

* Update camera to use data handler

* Update init

* Parallelize API calls

* Remove cruft

* Minor tweaks

* Refactor data handler

* Update climate to use data handler

* Fix pylint error

* Fix climate update not getting fresh data

* Update climate data

* update to pyatmo 4.0.0

* Refactor for pyatmo 4.0.0

* Exclude from coverage until tests are written

* Fix typo

* Reduce parallel calls

* Add heating request attr

* Async get_entities

* Undo parallel updates

* Fix camera issue

* Introduce individual scan interval per device class

* Some cleanup

* Add basic webhook support for climate to improve responsiveness

* Replace ClimateDevice by ClimateEntity

* Add support for turning camera on/off

* Update camera state upon webhook events

* Guard data class registration with lock

* Capture errors

* Add light platform

* Add dis-/connect handling

* Fix set schedule service

* Remove extra calls

* Add service to set person(s) home/away

* Add service descriptions

* Improve service descriptions

* Use LightEntity instead of Light

* Add guard if no data is retrieved

* Make services entity based

* Only raise platform not ready if there is a NOC

* Register webhook even during runtime

* Fix turning off event

* Fix linter error

* Fix linter error

* Exclude light platform from coverage

* Change log level

* Refactor public weather sensor to use data handler

* Prevent too short coordinates

* Ignore modules without _id

* Code cleanup

* Fix test

* Exit early if no home data is retrieved

* Prevent discovery if already active

* Add services to (un-)register webhook

* Fix tests

* Not actually a coroutine

* Move methods to base class

* Address pylint comment

* Address pylint complaints

* Address comments

* Address more comments

* Add docstring

* Use single instance allowed

* Extract method

* Remove cruft

* Write state directly

* Fix test

* Add file to coverage

* Move nested function

* Move nested function

* Update docstring

* Clean up code

* Fix webhook bug

* Clean up listeners

* Use deque

* Clean up prints

* Update homeassistant/components/netatmo/sensor.py

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

* Update homeassistant/components/netatmo/sensor.py

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

* Update homeassistant/components/netatmo/sensor.py

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

* Update homeassistant/components/netatmo/sensor.py

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

* Update homeassistant/components/netatmo/sensor.py

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

* Update homeassistant/components/netatmo/sensor.py

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

* Update homeassistant/components/netatmo/camera.py

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

* Update homeassistant/components/netatmo/camera.py

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

* Update homeassistant/components/netatmo/camera.py

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

* Update homeassistant/components/netatmo/camera.py

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

* Update homeassistant/components/netatmo/camera.py

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

* Update homeassistant/components/netatmo/camera.py

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

* Rename data_class variable

* Break when match

* Extract method

* Extract methods

* Rename variable

* Improve comment

* Some refinements

* Extra

* Extract method

* Simplify code

* Improve reability

* Code simplification

* Simplify code

* Simplify code

* Code cleanup

* Fix import

* Clean up

* Clean up magic strings

* Replace data_class_name with CAMERA_DATA_CLASS_NAME

* Replace data_class_name with CAMERA_DATA_CLASS_NAME

* Replace data_class_name with HOMEDATA_DATA_CLASS_NAME

* Replace data_class_name in public weather sensor

* Clean up

* Remove deprecated config options

* Schedule immediate update on camera reconnect

* Use UUID to clearly identify public weather areas

* Use subscription mode

* Move clean up of temporary data classes

* Delay data class removal

* Fix linter complaints

* Adjust test

* Only setup lights if webhook are registered

* Prevent crash with old config entries

* Don't cache home ids

* Remove stale code

* Fix coordinates if entered mixed up by the user

* Move nested function

* Add test case for swapped coordinates

* Only wait for discovery entries

* Only use what I need

* Bring stuff closer to where it's used

* Auto clean up setup data classes

* Code cleanup

* Remove unneccessary lock

* Update homeassistant/components/netatmo/sensor.py

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

* Update tests/components/netatmo/test_config_flow.py

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

* Clean up dead code

* Fix formating

* Extend coverage

* Extend coverage

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-08-04 20:46:46 +02:00
Patrick 0780650015
Make ozw CCT use device attributes instead of hard coded values (#38054) 2020-08-04 20:15:21 +02:00
Daniel Correa Lobato 86fc977ff5
Update notify.py (#38526)
Clickatell can returns 202 when a message is accepted for delivery. So, success can be indicated by 200 or 202 code (https://archive.clickatell.com/developers/api-docs/http-status-codes-rest/)
2020-08-04 16:51:15 +02:00
Phil Bruckner df8e179207
Fix sensor.time intermittent startup exception (#38525) 2020-08-04 16:39:36 +02:00
Stefan Agner c2f5831181
Support dual stack IP support (IPv4 and IPv6) (#38046)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-08-04 15:34:23 +02:00
pbalogh77 fe07d79744
Fix Fibaro component failure to load with HC3 (#38528)
Fixed a rarely occuring problem (maybe a change with Fibaro HC3) where some scenes don't have a "visible" parameter, which was assumed to be mandatory in the past.
2020-08-04 14:55:03 +02:00
Daniel Perna 0c030cb8cf
Update pyhomematic to 0.1.68 (#38530) 2020-08-04 14:42:25 +02:00
Davide Varricchio 45e451271e
Bump pyaehw4a1 to 0.3.9 (#38347)
* Bump pyaehw4a1 to 0.3.9

* Add myself to xiaomi miio codeowners (#38350)

* add myself to xiaomi miio codeowners

* Update CODEOWNERS

* Update manifest.json

* Upgrade youtube_dl to version 2020.07.28 (#38328)

* Temporary lock pip to 20.1.1 to avoid build issue (#38358)

* Add wheels job for building core wheels (#38359)

* Bump androidtv to 0.0.47 and adb-shell to 0.2.1 (#38344)

* Add jobs names to Wheels builds (#38363)

* Update aioharmony to 0.2.6 (#38360)

* Update run-in-env.sh (#36577)

* Bump aioambient to 1.2.0 (#38364)

* Bump simplisafe-python to 9.2.2 (#38365)

* Ignore remote Plex clients during plex.tv lookup (#38327)

* Avoid error with ignored harmony config entries (#38367)

* Bump ElkM1 library version. (#38368)

To reduce required version of dependent library.
No code changed.

* Add basic websocket api for OZW (#38265)

* Prevent nut config flow error when checking ignored entries (#38372)

* Revert "Prevent nut config flow error when checking ignored entries (#38372)"

This reverts commit 9e0530df1d.

* Revert "Add basic websocket api for OZW (#38265)"

This reverts commit 3ca93baa55.

* Revert "Bump ElkM1 library version. (#38368)"

This reverts commit 143f55ad12.

* Revert "Avoid error with ignored harmony config entries (#38367)"

This reverts commit 90a10baf38.

* Revert "Ignore remote Plex clients during plex.tv lookup (#38327)"

This reverts commit 67cdeafe21.

* Revert "Bump simplisafe-python to 9.2.2 (#38365)"

This reverts commit 01d68e01c6.

* Revert "Bump aioambient to 1.2.0 (#38364)"

This reverts commit bec6904eb9.

* Revert "Update run-in-env.sh (#36577)"

This reverts commit 53acc1b41e.

* Revert "Update aioharmony to 0.2.6 (#38360)"

This reverts commit a991d6f131.

* Revert "Add jobs names to Wheels builds (#38363)"

This reverts commit 58dcc059c7.

* Revert "Bump androidtv to 0.0.47 and adb-shell to 0.2.1 (#38344)"

This reverts commit 14b4722b69.

* Revert "Add wheels job for building core wheels (#38359)"

This reverts commit cb9e76adb7.

* Revert "Temporary lock pip to 20.1.1 to avoid build issue (#38358)"

This reverts commit b2207ed776.

* Revert "Upgrade youtube_dl to version 2020.07.28 (#38328)"

This reverts commit 144e827ce9.

* Revert "Add myself to xiaomi miio codeowners (#38350)"

This reverts commit 88538254ec.

Co-authored-by: starkillerOG <starkiller.og@gmail.com>
Co-authored-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Jeff Irion <JeffLIrion@users.noreply.github.com>
Co-authored-by: ehendrix23 <hendrix_erik@hotmail.com>
Co-authored-by: Aaron Bach <bachya1208@gmail.com>
Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Glenn Waters <gwwaters@gmail.com>
Co-authored-by: Charles Garwood <cgarwood@gmail.com>
2020-08-04 12:22:58 +02:00
Jean-Yves Avenard 988cbf12ce
Cache emulated hue states attributes between get and put calls to avoid unexpected alexa errors (#38451)
* Wait for the state of the entity to actually change before resolving PUT request

Additionally, we cache the entity's properties for up to two seconds for the successive GET state request

When Alexa issues a command to a Hue hub; it immediately queries the hub for the entity's state to confirm if the command was successful.
It expects the state to be effective immediately after the PUT request has been completed.
There may be a delay for the new state to actually be active, this is particularly obvious when using group lights.
This leads Alexa to report that the light had an error.

So we wait for the state of the entity to actually change before responding to the PUT request.

Due to rounding issue when converting the HA range (0..255) to Hue range (1..254) we now cache the state sets by Alexa and return those cached values for up to two seconds so that Alexa gets the same value as it originally set.

Fixes #38446

* Add new tests verifying emulated_hue behaviour.

* Increase code test coverage.

The remaining uncovered lines can't be tested as they mostly check that the hass framework or the http server properly work.

This commit doesn't attempt to fix exposed issues as it would be out of scope ; it merely create the tests to exercise the whole code.

* Update homeassistant/components/emulated_hue/hue_api.py

* Add test for state change wait timeout

* Preserve the cache long enough for groups to change

* Update tests/components/emulated_hue/test_hue_api.py

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-08-03 15:30:16 -10:00
J. Nick Koston 62c664fbbd
Reduce time to reload yaml and check configuration (#38469)
* Reduce time to reload yaml and check configuration

We spend a significant amount of time compiling templates
that we have already compiled.

Use an LRU cache to avoid re-compiling templates that
we frequently use.

* pylint

* switch to WeakValueDictionary

* preen
2020-08-04 03:00:44 +02:00
Aaron Bach d498246fb6
Bump aioambient to 1.2.1 (#38519) 2020-08-03 12:30:46 -06:00
Aaron Bach 6fd39f57ee
Remove YAML configuration support for IQVIA (#38141) 2020-08-03 19:35:36 +02:00
Aaron Bach 53e162c922
Remove deprecated Slack attachments framework (#38139) 2020-08-03 19:33:49 +02:00
Cooper Dale 0b0e323632
Fix missing .name at entity_id in service example (#38515)
for propper filename
2020-08-03 18:22:52 +02:00
Eugene Prystupa 809c2980df
Log the version reported by Bond hub upon startup to facilitate troub… (#38508) 2020-08-03 17:55:04 +02:00
Erik Montnemery 86e38a8467
Add missing MQTT strings (#38513) 2020-08-03 17:54:09 +02:00
Bram Kragten a187183bd1
Update frontend to 20200803.0 (#38514) 2020-08-03 17:52:58 +02:00
Shane Qi 85497c6b75
Fix Lutron Caseta devices loading when missing serials (#38255)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-08-03 16:50:47 +02:00
J. Nick Koston 2f1d989df2
Bump hass-nabucasa to avoid the performance penalty loading ecdsa (#38056) 2020-08-03 12:55:30 +02:00
J. Nick Koston 8f2abc2ee1
Fix harmony activity starting initial state (#38439) 2020-08-03 12:55:15 +02:00
jjlawren e940811a8b
Clean up Plex clip handling (#38500) 2020-08-03 12:41:24 +02:00
jjlawren 67312e2d42
Fix lookup by Plex media key when playing on Sonos (#38119) 2020-08-03 12:40:48 +02:00
James Hilliard 064cc52ad6
Add config flow to HLK-SW16 (#37190)
* Add config flow to HLK-SW16

* Use entry_id for unique_id

* Add options update capability

* Refactor entry_id under domain

* Remove name from config

* Set options

* Remove options flow

* remove unneccesary else block from validate_input and move domain cleanup to async_unload_entry

* Add tests and config import

* Add back config schema

* Remove config import

* Refactor unload

* Add back config import

* Update coveragerc

* Don't mock validate_input

* Test duplicate configs

* Add import test

* Use patch for timeout test

* Use mock for testing timeout

* Use MockSW16Client for tests

* Check mock_calls count

* Remove unused NameExists exception

* Remove title from strings.json

* Mock setup for import test

* Set PARALLEL_UPDATES for switch

* Move hass.data.setdefault(DOMAIN, {}) to async_setup_entry
2020-08-02 17:52:53 -10:00
Matthew Garrett 76b46b9175
Provide a unique entity ID for lgsoundbar (#38494)
The device gives us a UUID, so let's just use that to construct a unique
ID.
2020-08-02 16:51:01 -10:00
Eugene Prystupa 542c6cce25
Ensure bond unique ids are unique across hubs (#38496) 2020-08-02 16:50:03 -10:00
HomeAssistant Azure ce71775722 [ci skip] Translation update 2020-08-03 00:02:55 +00:00
clssn 428c376fe4
Update numato-gpio to 0.8.0 (#38415)
* Bump the numato-gpio dependency

This relaxes the pyserial dependency to >=3.1.1 as requested by the
project with respect to the upcoming, stricter pip resolver.

* Update numato-gpio due to deprecation of class BinarySensorDevice
2020-08-02 16:35:21 -05:00
Villhellm c403c77cff
Catch AssertionError when onkyo zone 3 detection fails (#38374)
This error would cause the entire integration to fail. This at least catches it gracefully.
2020-08-02 14:06:16 -05:00
J. Nick Koston 03a0114e10
Avoid shutdown delays when emulated_hue is enabled (#38472)
We would have to wait for the select to timeout for
emulated_hue upnp thread to shutdown

We now close the socket so the select unblocks
right away
2020-08-02 08:32:07 -10:00
Matthias Weiss 34b911203c
Add homematic IPWKeyBlindMulti device (#38345) 2020-08-02 17:55:17 +02:00
Robert Van Gorkom c913d17913
Add bed sensor availability for withings (#37906) 2020-08-02 09:36:14 -05:00
Maciej Bieniek a57dca1e11
Add sensor platform for AccuWeather integration (#38312)
* Add sensor platform

* Fix typo
2020-08-02 09:22:51 -05:00
RogerSelwyn 2c887dfe12
Update pyskyqhu to 0.1.1 (#38461)
* Fix module pinning in pyskyhub

* Bump pyskyqhub to 0.1.1
2020-08-02 09:13:17 -05:00
Jeff Irion 071b8ed8a5
Fix Android TV ADB authorization (#38471) 2020-08-02 09:08:12 -05:00
Phil Bruckner 9e12e3f96c
Allow automation to be turned off without stopping actions (#38436) 2020-08-01 21:31:47 -05:00
HomeAssistant Azure 1c7cc63f4c [ci skip] Translation update 2020-08-02 00:02:48 +00:00
Michaël Arnauts f09a9abc1c
Add optional unique_id attribute to the template platforms (#38011)
* Add unique_id to template platforms

* Update test_binary_sensor.py

* Update test_binary_sensor.py
2020-08-01 12:45:55 -10:00
Oncleben31 6b85e23408
Refactor Météo-France to use API instead of web scraping (#37737)
* Add new python library

* Update requirements

* Remove old libs

* config flow with client.search_places

* WIP: UI config + weather OK

* WIP: sensors

* WIP: add pressure to weather + available to sensor

* WIP: coordinator next_rain + alert

* Make import step working

* migrate to meteofrance-api v0.0.3

* Create coordinator for rain only if data available in API

* Fix avoid creation of rain sensor when not available.

* Add options flow for forecast mode

* Fix import config causing bug with UI

* Add alert sensor

* Add coastal alerts when available (#5)

* Use meteofrance-api feature branch on Github

* Update unit of next_rain sensor

* Test different type of attibutes

* Typo for attribute

* Next rain sensor device class as timestamp

* Better design for rain entity attributes

* use master branch for meteofrance-api

* time displayed in the HA server timezone.

* fix bug when next_rain_date_locale is None

* Add precipitation and cloud cover sensors

* Add variable to avoid repeating computing

* Apply suggestions from code review

Co-authored-by: Quentame <polletquentin74@me.com>

* Attributes names in const.

* Cleaning

* Cleaning: use current_forecast and today_forecast

* Write state to HA after fetch

* Refactor, Log messages and bug fix. (#6)

* Add messages in log

* Refactor using 'current_forecast'.

* Use % string format with _LOGGER

* Remove inconsistent path

* Secure timestamp value and get current day forecast

* new unique_id

* Change Log message to debug

* Log messages improvement

* Don't try to create weather alert sensor if not in covered zone.

* convert wind speed in km/h

* Better list of city in config_flow

* Manage initial CONF_MODE as None

* Review correction

* Review coorections

* unique id correction

* Migrate from previous config

* Make config name detailed

* Fix weather alert sensor unload (#7)

* Unload weather alert platform

* Revert "Unload weather alert platform"

This reverts commit 95259fdee84f30a5be915eb1fbb2e19fcddc97e4.

* second try in async_unload_entry

* Make it work

* isort modification

* remove weather alert logic in sensor.py

* Refactor to avoid too long code lines

Co-authored-by: Quentin POLLET <polletquentin74@me.com>

* Update config tests to Meteo-France (#18)

* Update meteo_france exception name

* Update MeteoFranceClient name used in tests

* Update 'test_user'

* Make test_user works

* Add test test_user_list

* Make test_import works

* Quick & Dirty fix on exception managment. WIP

* allow to catch MeteoFranceClient() exceptions

* remove test_abort_if_already_setup_district

* bump meteofrance-api version

* We do not need to test Exception in flow yet

* Remove unused data

* Change client1 fixture name

* Change client2 fixture name

* Finish cities step

* Test import with multiple choice

* refactor places

* Add option flow test

Co-authored-by: Quentin POLLET <polletquentin74@me.com>

* Fix errors due to missing data in the API (#22)

* fix case where probability_forecast it not in API
* Workaround for probabilty_forecast data null value
* Fix weather alert sensor added when shouldn't
* Add a partlycloudy and cloudy value options in condition map
* Enable snow chance entity

* fix from review

* remove summary

* Other fix from PR review

* WIP: error if no results in city search

* Add test for config_flow when no result in search

* Lint fix

* generate en.json

* Update homeassistant/components/meteo_france/__init__.py

* Update homeassistant/components/meteo_france/__init__.py

* Update homeassistant/components/meteo_france/__init__.py

* Update homeassistant/components/meteo_france/sensor.py

* Update homeassistant/components/meteo_france/__init__.py

* Update homeassistant/components/meteo_france/__init__.py

* string: city input --> city field

Co-authored-by: Quentin POLLET <polletquentin74@me.com>
2020-08-01 22:56:00 +02:00
Chris 607ba08e23
Add node neighbors to ozw websocket api (#38447)
* Add node neighbors to websocket api

* Update homeassistant/components/ozw/websocket_api.py

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

* Update tests/components/ozw/test_websocket_api.py

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

Co-authored-by: Charles Garwood <cgarwood@newdealmultimedia.com>
2020-08-01 15:50:04 -04:00
Eugene Prystupa 11994d207a
Add zeroconf discovery for bond integration (#38448)
* Add zeroconf discovery for bond integration

* Add zeroconf discovery for bond integration (fix typo)

* Add zeroconf discovery for bond integration (PR feedback)

* Add zeroconf discovery for bond integration (PR feedback)

* Add zeroconf discovery for bond integration (PR feedback)
2020-08-01 11:18:40 -05:00
Phil Bruckner c3a820c4a3
Fix queued script not updating current attribute when queuing (#38432) 2020-08-01 15:51:48 +02:00
J. Nick Koston fe69a85386
Improve logging when a unique id conflict is detected (#38434)
* fix error when unique id is re-used

* add test for the logging

* Update homeassistant/helpers/entity_platform.py

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

* Update homeassistant/helpers/entity_platform.py

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-08-01 11:20:37 +02:00