Commit Graph

274 Commits (0dc8fb497b1162c08286dfd03f54da3d237f38dd)

Author SHA1 Message Date
Allen Porter bcadccf7aa
Invalidate HLS Stream on nest url refresh failure (#47869)
This will ensure that the HLS stream is re-created and fetches a new url.
2021-03-14 22:49:21 -07:00
Philip Allgaier 4bafd03dff
Consistent spelling of "PIN" (#47771) 2021-03-11 16:18:16 -05:00
Quentame 198ecb0945
Uniformize platform setup (#47101)
* A platform is not a component

* Fix dynalite

* SUPPORTED_PLATFORMS --> PLATFORMS

* In tests

* In tests 2

* Fix SmartThings

* Fix ZHA test

* Fix Z-Wave

* Revert Z-Wave

* Use PLATFORMS const in ambient_station

* Fix ihc comment
2021-03-02 21:43:59 +01:00
Allen Porter b1898cc176
Bump google-nest-sdm to v0.2.12 to improve API call error messages (#47108) 2021-02-26 11:20:32 -08:00
Allen Porter 19f5b467b7
Make FAN_ON use the max duration rather than 15 min default (#46489) 2021-02-23 20:38:52 -06:00
HomeAssistant Azure 9159f54900 [ci skip] Translation update 2021-02-24 00:04:14 +00:00
HomeAssistant Azure 0cb1f61deb [ci skip] Translation update 2021-02-21 00:07:04 +00:00
HomeAssistant Azure d9ce7db554 [ci skip] Translation update 2021-02-19 00:03:06 +00:00
HomeAssistant Azure 1bb535aa67 [ci skip] Translation update 2021-02-16 00:03:57 +00:00
tkdrob a5a45f29e2
Cleanup unused loggers (#46510) 2021-02-14 13:46:58 +01:00
Allen Porter 10e88cd23d
Improve nest defense against broken event loop on shutdown (#46494) 2021-02-14 13:36:05 +01:00
HomeAssistant Azure 8007391244 [ci skip] Translation update 2021-02-11 00:02:56 +00:00
Allen Porter 26f455223b
Update nest stream URLs expiration (#46311) 2021-02-09 23:53:34 -08:00
Allen Porter 2bcf87b980
Change the API boundary between camera and stream with initial improvement for nest expiring stream urls (#45431)
* Change the API boundary between stream and camera

Shift more of the stream lifecycle management to the camera.  The motivation is to support stream urls that expire
giving the camera the ability to change the stream once it is created.

* Document stream lifecycle and simplify stream/camera interaction

* Reorder create_stream function to reduce diffs

* Increase test coverage for camera_sdm.py

* Fix ffmpeg typo.

* Add a stream identifier for each stream, managed by camera

* Remove stream record service

* Update homeassistant/components/stream/__init__.py

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

* Unroll changes to Stream interface back into camera component

* Fix preload stream to actually start the background worker

* Reduce unncessary diffs for readability

* Remove redundant camera stream start code

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-02-08 19:53:28 -08:00
HomeAssistant Azure ce159d7db3 [ci skip] Translation update 2021-02-06 00:07:22 +00:00
HomeAssistant Azure c6bd5b1b71 [ci skip] Translation update 2021-02-05 00:03:54 +00:00
Paulus Schoutsen 959ed6d077 Update translations 2021-02-03 11:46:49 +01:00
Allen Porter bf4b4623aa
Bump google-nest-sdm to 0.2.9 (#45244)
This library contains user experience for the case where oauth
token cannot be refreshed on startup, which regressed after
https://github.com/home-assistant/core/pull/44686
2021-01-16 23:39:33 +01:00
J. Nick Koston da677f7d5a
Add support for discovery via DHCP (#45087)
* Add support for discovery via DHCP

* additional tesla ouis

* merge tests

* dhcp test

* merge requirements test

* dhcp test

* dhcp discovery

* dhcp discovery

* pylint

* pylint

* pylint

* fix

* Add matching tests

* 100% cover

* cleanup

* fix codespell

* Update exception handling

* remove unneeded comment

* fix options handling exception

* fix options handling exception
2021-01-14 09:09:08 +01:00
Allen Porter eebd0d333e
Clear cached nest event images after expiration (#44956)
* Clear cached nest event images after expiration

* Don't share removal cleanup with alarm cleanup

Don't share code across these functions since it would require a dummy timestamp values that is unnecessary.

* Increase test coverage on sdm camera remove

* Update homeassistant/components/nest/camera_sdm.py

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

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-01-12 22:08:59 -08:00
Paulus Schoutsen f19b72ea02
Drop awarecan from codeowners (#45049) 2021-01-11 17:58:59 +01:00
Allen Porter a73a82e381
Improve nest client error handling using newest library (#44998) 2021-01-09 17:52:30 -08:00
Ville Skyttä 2fb3be50ab
Make DeviceRegistry.async_get_device connections arg optional (#44897)
* Make async_get_device connections Optional, default None

* Remove unnecessary async_get_device connections arg usages

Some of these were using an incorrect collection type, which didn't
cause issues mostly just due to luck.
2021-01-07 13:49:45 +01:00
Allen Porter 560e3811a3
Generate nest images thumbnails from events (#44638)
* Capture nest still images from events

Use python google-nest-sdm API for fetching images.  Update home assistant
to use the google-nest-sdm API for fetching the image contents generated
by the server.  This uses the existing websession object for server fetches,
reducing the amount of new code and facilites unit testing using the existing
mechanism.

Simplify tests using the image fetch API rather than a snapshot API
2021-01-06 07:02:04 -08:00
Allen Porter 6cd18971b1
Propose an integration quality for nest SDM integration (#44755)
* Propose the nest SDM integration is silver quality

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-01-04 19:45:33 -08:00
Allen Porter c92353088c
Fix Fan support in nest climate by adding HVAC_MODE_FAN_ONLY support (#44203)
* Add HVAC_MODE_FAN_ONLY to nest climate

* Remove unreachable code

* Fix HVAC_FAV_ONLY bug; must also turn off hvac
2021-01-04 16:43:41 +01:00
Allen Porter 321c0a87ae
Resolve nest pub/sub subscriber token refresh issues (#44686) 2021-01-02 01:51:01 +01:00
Allen Porter fe9a254017
Fix legacy nest api binary_sensor initialization (#44674) 2020-12-31 19:22:24 +01:00
Allen Porter baacf2cd7d
Publish timestamps in nest events (#44641) 2020-12-30 10:23:48 +01:00
Allen Porter 71af0fac16
Improve nest setup error handling (#44385)
* Improve error handling user experience

This is meant to make the nest integration quieter.  Exceptions are handled with a single log error message.


Co-authored-by: j-stienstra <65826735+j-stienstra@users.noreply.github.com>
2020-12-27 20:30:51 -08:00
Allen Porter 51b88337ca
Simplify nest event handling (#44367)
* Simplify nest event handling

Use device specific update callbacks rather than a global callback.
The motivation is to prepare for a follow up change that will store
camera specific event tokens on the camera itself, so that a service
can later fetch event specific image snapshots, which would be difficult
to send across the event bus.

* Increase nest camera test coverage

* Remove unnecessary device updates for nest cameras

* Remove unused imports

* Fix device id check to look at returned entry

* Remove unused imports after rebase

* Partial revert of nest event simplification

* Push more update logic into the nest library

* Revert nest device_info changes

* Revert test changes to restore global update behavior

* Bump nest library version to support new callback interfaces
2020-12-27 09:49:22 +01:00
HomeAssistant Azure 6f2ed86c49 [ci skip] Translation update 2020-12-25 00:03:46 +00:00
HomeAssistant Azure 6b743c3d16 [ci skip] Translation update 2020-12-24 00:03:44 +00:00
HomeAssistant Azure 139fb518d6 [ci skip] Translation update 2020-12-23 00:03:22 +00:00
Allen Porter 24ccdb55bb
Move Legacy Works With Nest integration to subdirectory (#44368)
* Move Legacy Works With Nest integration to subdirectory

Motivation is to streamline the actively developed integration e.g. make code coverage easier to reason about and simplify __init__.py
2020-12-22 12:42:37 -08:00
HomeAssistant Azure 2ee2f85574 [ci skip] Translation update 2020-12-22 00:06:12 +00:00
HomeAssistant Azure f3cabe97e0 [ci skip] Translation update 2020-12-21 00:04:09 +00:00
Allen Porter 81341bbf91
Handle expiration of nest auth credentials (#44202)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-12-20 01:41:29 +01:00
HomeAssistant Azure 4bdb793a94 [ci skip] Translation update 2020-12-18 00:03:48 +00:00
Tim Messerschmidt a0ce541c0d
Bump google-nest-sdm to 0.2.1 to support more SDM Pub/Sub realms (#44163) 2020-12-15 07:38:32 -08:00
Allen Porter 1003464544
Fix double underscore typo in fan_mode ValueError (#44182) 2020-12-14 19:52:14 -08:00
HomeAssistant Azure 9e1647d634 [ci skip] Translation update 2020-12-15 00:04:49 +00:00
Allen Porter 1a8123aba6
Increase nest climate test coverage (#44146) 2020-12-12 20:57:02 +01:00
Allen Porter 6d12e764b7
Increase test coverage for nest camera (#44144) 2020-12-12 10:17:43 +01:00
HomeAssistant Azure 848224262c [ci skip] Translation update 2020-12-10 00:03:01 +00:00
HomeAssistant Azure 9c63fbfcb1 [ci skip] Translation update 2020-12-07 00:04:18 +00:00
Allen Porter 0670124e8d
Address PR cleanup for nest device triggers (#43961) 2020-12-05 10:55:19 +01:00
HomeAssistant Azure 6e74f90136 [ci skip] Translation update 2020-12-05 00:03:50 +00:00
HomeAssistant Azure 42f00cff30 [ci skip] Translation update 2020-12-04 00:05:42 +00:00
HomeAssistant Azure 8e6108b9e1 [ci skip] Translation update 2020-12-03 00:04:35 +00:00
Franck Nijhof f2a371257d
Translation update 2020-12-02 20:51:05 +01:00
HomeAssistant Azure fc42f59b0b [ci skip] Translation update 2020-12-02 00:03:14 +00:00
HomeAssistant Azure cf9598fe4f [ci skip] Translation update 2020-12-01 00:03:00 +00:00
Allen Porter 945a0a9f7e
Add nest device triggers for camera and doorbell events (#43548) 2020-11-30 09:19:42 +01:00
HomeAssistant Azure 301a3e5481 [ci skip] Translation update 2020-11-27 00:03:57 +00:00
HomeAssistant Azure ed16c5078f [ci skip] Translation update 2020-11-26 00:03:15 +00:00
HomeAssistant Azure cbfd8a5a14 [ci skip] Translation update 2020-11-25 00:03:05 +00:00
Allen Porter 745823dd55
Add nest SDM API camera/doorbell events (#42700)
* Add nest SDM API camera/doorbell events

Events are fired  when pubsub messages are received.   When messages
are received lookup a home assistant device id from the nest
device id, so that the home assistant device id can be included
in the event payload.

* Update homeassistant/components/nest/__init__.py

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

* Update nest code style based on PR feedback

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-11-24 14:34:43 -08:00
springstan 5a892e8fca
Add unknown_authorize_url_generation to base strings for config flows (#42484) 2020-11-24 12:00:16 -05:00
Allen Porter 3dd14e05e3
Update nest library and switch events to async (#43583) 2020-11-24 08:53:50 -07:00
HomeAssistant Azure acca35cdc4 [ci skip] Translation update 2020-11-22 00:04:54 +00:00
Allen Porter 2d14f07396
Improve nest SDM integration error handling (#43271) 2020-11-19 12:26:49 +01:00
HomeAssistant Azure 9a21421807 [ci skip] Translation update 2020-11-15 00:03:48 +00:00
Allen Porter 3e46c42307
Catch the right nest stream refresh exception error (#43189) 2020-11-13 22:37:09 -08:00
Allen Porter 1061f78f12
Add watchdog to reset nest subscriber (#43034) 2020-11-11 13:56:59 +01:00
Paulus Schoutsen 54f3d9078a Update translations 2020-11-11 12:10:09 +01:00
Allen Porter 94db07ca8c
Update nest sdm camera to refresh in background (#42865)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-11-10 23:48:02 +01:00
springstan a7bd521768
Remove temporary variable from supported_features (#42685)
* Remove temporary variable from supported_features

* Revert removing temp variable for supported features hunterdouglas
2020-11-09 13:19:29 +01:00
Allen Porter 64f06b2b00
Update nest SDM climate simplifying support for eco mode (#42955) 2020-11-09 11:35:38 +01:00
HomeAssistant Azure 57c6bb96f4 [ci skip] Translation update 2020-11-07 00:04:02 +00:00
Allen Porter a5da98680a
Add nest climate support for SDM API (#42702)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-11-06 09:57:02 +01:00
HomeAssistant Azure e972686a13 [ci skip] Translation update 2020-11-06 00:04:57 +00:00
HomeAssistant Azure b71e28dfac [ci skip] Translation update 2020-11-04 00:13:14 +00:00
Allen Porter 89a5c9fcac
Add image support to nest SDM api (#42556) 2020-11-03 09:31:43 +01:00
HomeAssistant Azure aab0ff2ea5 [ci skip] Translation update 2020-11-03 00:04:39 +00:00
HomeAssistant Azure b9d04b9304 [ci skip] Translation update 2020-10-30 00:02:45 +00:00
HomeAssistant Azure 026e0063fe [ci skip] Translation update 2020-10-29 00:09:16 +00:00
HomeAssistant Azure 7a06af53ef [ci skip] Translation update 2020-10-28 00:03:38 +00:00
Allen Porter 8caa177ba1
Add Nest cam support for the SDM API (#42325)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-10-27 15:20:01 +01:00
HomeAssistant Azure f4cebfbb7e [ci skip] Translation update 2020-10-27 00:06:28 +00:00
Franck Nijhof ba655c5451
Add missing config flow translation key for Nest (#42423) 2020-10-26 20:29:20 +01:00
Paulus Schoutsen 810ef349c3
Do not set up DSM when setting up Nest legacy (#42406) 2020-10-26 16:40:43 +01:00
Allen Porter 5e9de88f4b
Fix nest to stop doing asyncio in a property (#42312)
This upgrades to the latest vesion of python-google-nest-sdm that
had bug fixes to stop doing asyncio in a property.
2020-10-24 23:33:52 +02:00
Allen Porter 0c852b5f81
Update nest integration with fixes from initial PR (#42250) 2020-10-24 20:48:28 +02:00
HomeAssistant Azure ed232ac733 [ci skip] Translation update 2020-10-24 00:05:17 +00:00
HomeAssistant Azure 6e53aa1155 [ci skip] Translation update 2020-10-23 00:03:04 +00:00
HomeAssistant Azure b102ad731f [ci skip] Translation update 2020-10-22 00:09:52 +00:00
Allen Porter 52b66e88c7
Update Nest integration to support Google Nest Device Access (new API) (#41689)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-10-21 10:17:49 +02:00
HomeAssistant Azure 81296b2b70 [ci skip] Translation update 2020-10-20 00:08:00 +00:00
HomeAssistant Azure 1a03bbda5a [ci skip] Translation update 2020-10-18 00:03:28 +00:00
J. Nick Koston 965bb2c8df
Update nest to use async_add_executor_job (#41926) 2020-10-16 13:31:16 +02:00
HomeAssistant Azure 11b812b82e [ci skip] Translation update 2020-10-16 00:04:33 +00:00
HomeAssistant Azure 994ae09f69 [ci skip] Translation update 2020-10-15 00:03:50 +00:00
HomeAssistant Azure ba55cb8955 [ci skip] Translation update 2020-10-14 00:04:41 +00:00
HomeAssistant Azure 1417a4161f [ci skip] Translation update 2020-10-13 00:03:24 +00:00
HomeAssistant Azure f787289ea0 [ci skip] Translation update 2020-10-12 00:03:31 +00:00
Christian Bilevits 1c4512bc40
Use common strings in Nest config flow (#41597) 2020-10-11 14:47:30 +02:00
HomeAssistant Azure 6ae12c3faf [ci skip] Translation update 2020-10-10 00:05:05 +00:00
HomeAssistant Azure 486c0b644a [ci skip] Translation update 2020-10-07 00:06:20 +00:00
springstan db582bdc1b
Use http status constants more, add HTTP_ACCEPTED and HTTP_BAD_GATEWAY (#39993)
* Use http status codes and add HTTP_BAD_GATEWAY constant

* Address review comments:
 - using constants in tado integration
 - using constant in media_player init.py

* Add and use HTTP_ACCEPTED constant
2020-09-15 20:01:07 +03:00