1
0
mirror of https://github.com/home-assistant/core.git synced 2026-06-02 05:34:15 +01:00
Commit Graph

131 Commits

Author SHA1 Message Date
Allen Porter 7b8b73f826 Update nest climate to avoid duplicate set mode commands (#79445) 2022-10-01 21:59:10 -04:00
PeteRager 504ce8e93a Set nest entities as unavailable on lost connection (#78773)
* NEST - Issues with lost internet connectivity #70479

Update Climate and Sensor entities to be unavailable when the device connectivity trait indicates the device is offline.

The prior behavior, the last known values would be displayed indefinitely if the device lost internet connectivity.  This was creating the illusion that the device was still connected.  With this change, the Home Assistant entities will become unavailable when the device loses connectivity.

* Update formatting

* Add doc strings, fix indentation

* Fix doc strings

* Update test_climate_sdm.py

* Update test_climate_sdm.py

* Update test_sensor_sdm.py

* Update test_sensor_sdm.py

* more formatting fixes

* Place availability logic in mixin

1. Consolidate repeated code into mixin and apply mixin to Climate and Sensor entities
2. Return true instead of super.available()
3. No unit test changes required to maintain code coverage

* Define self._device is mixin to make linter happier

* Remove logger used for debugging

* restore whitespace

* Fix test due to underlying merge change

* Update availability_mixin.py

* Move availability logic into device_info

* Update sensor_sdm.py
2022-09-28 19:23:11 -07:00
epenet f453726b18 Cleanup HVACAction and HVACMode in tests (#78813) 2022-09-20 20:30:54 +02:00
epenet fe747601ff Cleanup DeviceClass and StateClass in tests (#78811) 2022-09-20 10:49:11 -04:00
epenet 7e41afe660 Adjust root-import in nest tests (#78769) 2022-09-19 15:41:45 +02:00
Franck Nijhof af2feb3d40 Update pyupgrade to v2.37.1 (#74989) 2022-07-11 16:54:01 +02:00
Allen Porter 1c4fee65c0 Migrate nest to new entity naming style (#74724) 2022-07-09 19:21:53 +02:00
Franck Nijhof 7cd68381f1 Search/replace RESULT_TYPE_* by FlowResultType enum (#74642) 2022-07-07 19:57:36 +03:00
Allen Porter 0cf922cc4e Allow legacy nest integration with no configuration.yaml (#74222) 2022-06-30 08:54:51 +02:00
epenet 35df012b6e Fix reauth step in nest (#74090) 2022-06-28 10:06:05 +02:00
Allen Porter cf9cab900e Allow multiple configuration entries for nest integration (#73720)
* Add multiple config entry support for Nest

* Set a config entry unique id based on nest project id

* Add missing translations and remove untested committed

* Remove unnecessary translation

* Remove dead code

* Remove old handling to avoid duplicate error logs
2022-06-21 16:36:13 +02:00
Allen Porter b014d558ff Add application credentials platform for nest and deprecate yaml for SDM API (#73050)
* Update the nest integration to be useable fully from the config flow

* Support discovery in nest config flow

* Remove configuration entries

* Remove unused import

* Remove dead code

* Update homeassistant/components/nest/strings.json

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

* Remove commented out code

* Use config flow for app auth reauthentication path

* Improves for re-auth for upgrading existing project and creds

* More dead code removal

* Apply suggestions from code review

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

* Remove outdated code

* Update homeassistant/components/nest/config_flow.py

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-06-15 07:15:53 -07:00
Allen Porter 0b7a030bd4 Fix fan support in nest, removing FAN_ONLY which isn't supported (#73422)
* Fix fan support in nest, removing FAN_ONLY which isn't supported

* Revert change to make supported features dynamic
2022-06-14 06:19:22 -07:00
Allen Porter 7a5fa8eb58 Update more nest tests to use common fixtures (#73303)
Update nest tests to use fixtures
2022-06-10 07:14:43 +02:00
uvjustin 73f2bca377 Make Stream.stop() async (#73107)
* Make Stream.start() async
* Stop streams concurrently on shutdown
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-06-08 00:10:53 +08:00
Allen Porter 3a8a816584 Cleanup nest config flow tests to use common setup fixtures (#72878)
* Cleanup nest config flow tests to use common setup

* Remove some conditionals in test setup
2022-06-02 21:42:52 -07:00
Erik Montnemery 47d0cc9b09 Update integrations to pass target player when resolving media (#72597) 2022-05-27 09:05:06 -07:00
Allen Porter c181af92a2 Throw nest climate API errors as HomeAssistantErrors (#72474) 2022-05-25 13:00:48 -07:00
Allen Porter 775be354a6 Cleanup nest async methods that do not need to actually await (#72170)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2022-05-20 07:47:18 -07:00
Allen Porter 5e49457c65 Add camera/stream platform diagnostics, exercised with nest (#69780) 2022-04-26 22:33:04 -07:00
Allen Porter bab9f4ba76 Fix nest error handling and bug in tests for media fetches (#70596) 2022-04-24 10:17:59 -10:00
Erik Montnemery 5e50a8abd5 Mark device triggers from hidden or auxiliary entities as secondary (#70335)
* Mark device triggers from hidden or auxiliary entities as secondary

* Update tests
2022-04-21 08:01:32 +02:00
Franck Nijhof c93c7e8eff Replace Camera STREAM_ constants with StreamType enum (#69871) 2022-04-11 16:27:27 -07:00
Allen Porter 66a183cfe3 Add nest device level diagnostics (#68024) 2022-03-29 16:56:03 -10:00
Marc Mueller 8f69d31322 Make TypeVars private (3) (#68207) 2022-03-17 19:11:14 +01:00
Allen Porter 2678d8120a Update nest media source to make device play most recent event (#67557) 2022-03-03 08:16:03 -08:00
Paulus Schoutsen 2a8dc38d2d Move media_source to after_deps (#67195) 2022-02-24 14:54:46 -08:00
Allen Porter f3add292d5 Update nest climate set_temperature to allow hvac_mode (#66909) 2022-02-19 20:57:29 -08:00
Allen Porter 58551ec66d Update nest camera tests to use common test fixture (#66192) 2022-02-17 23:08:29 -08:00
Allen Porter 572fa7d055 Update nest camera to pull still images from stream component (#66427)
* Update nest to use stream thumbnail when it exists

* Update nest camera to always pull still image from stream

Update nest camera to always pull the still iamge from the stream component,
removing the use of the separate ffmpeg call, and removing use of the nest event
image. Image for events can now be pulled using the media source APIs, rather
than relying on the camera snapshot.

* Simplify a comment

* Remove more unused variables

* Simplify comments, image, and test code

* Remove assertions for placeholder images
2022-02-14 21:45:09 -08:00
Allen Porter b2f5ab2008 Publish Nest Motion/Person events with optional user defined zone information (#66187)
Publish Nest events with zone information if present. User defined zones are configured
in the Google Home app, and are published with Motion/Person event.
2022-02-11 21:22:53 -08:00
Allen Porter ddd198de37 Fix legacy nest diagnostics to return empty rather than fail (#65824)
Fix legacy nest diangostics to return gracefully, rather than a TypError
by checking explicitiy for SDM in the config entry. Update diagnostics
to use the common nest test fixture, and extend with support for the
legacy nest config. Use the sdm test fixture in the existing legacy
tests so they all share the same config files.
2022-02-06 14:14:25 -08:00
Allen Porter 956ceb6c68 Update nest diagnostics (#65141) 2022-01-28 21:50:38 +01:00
Allen Porter ebaaa13759 Update nest climate and sensor test fixtures (#64800)
Update nest climate tests to use shared fixtures for component setup. Add an additional
fixture for creating devices shared between the climate and sensor tests.
2022-01-23 16:06:04 -08:00
Allen Porter a5fb60fd3a Update nest media player device thumbnails (#64738) 2022-01-22 23:46:00 -08:00
Allen Porter cdf7742c3e Refactor nest test_init_sdm tests to use fixtures with varied config types (#64736) 2022-01-22 20:56:03 -08:00
Allen Porter e56e25180b Strip whitespace in nest cloud project id (#64503) 2022-01-20 09:13:49 +01:00
Allen Porter f1435b1385 Add diagnostic information for nest (#64405)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-01-19 09:30:48 +01:00
Allen Porter 849abaca8b Bump google-nest-sdm to 1.5.0 and add nest mp4 clip transcoding to animated gif (#64155) 2022-01-15 12:31:02 -08:00
Allen Porter 64c5f69c3d Add thumbnails to nest media player (#62532) 2022-01-13 22:31:33 -08:00
Marc Mueller d057850971 Update typing - collections.abc (3) (#63947) 2022-01-12 08:04:17 +01:00
Allen Porter 789c0a24dd Improve nest media player clip/image and event handling for multiple events in a short time range (#63149) 2022-01-11 20:54:49 -08:00
Allen Porter 4203e1b064 Delete nest event image fetching and use same APIs as media player (#62789) 2022-01-07 16:37:54 +01:00
Allen Porter da71e89f53 Add tests that exercise nest dhcp discovery behavior (#62526)
* Add tests that exercise nest dhcp discovery

Add tests that exercise the behavior of dhcp discovery for nest,
which is effectively that it doesn't work -- it only works when
you have already added a configuration.yaml.

Discovery can be made to work by using an entirely config flow
driven approach, which is in discussion.

* Adjust whitespace from merge
2022-01-05 17:35:55 -08:00
Allen Porter d6c8f3965a Improve nest camera failure handling on removal (#63207) 2022-01-05 16:17:51 +01:00
Allen Porter 224f960050 Set the nest configuration title to a user friendly name (#62886)
* Set the nest configuration title to a user friendly name

Set the config entry title name to be the name of the Google Home or
Nest Home that was authorized. In case more than one home was authorized,
they are all listed since they are all accessed over a single shared
home.

* Fix pylint errors

* Resolve pylint errors
2022-01-04 19:23:20 -08:00
Allen Porter 0bcad5579b Set nest climate hvac_action to report idle when hvac mode is not off (#62811) 2022-01-04 17:28:46 +01:00
Allen Porter 9e3f7d2961 Simplify nest reauth config flow (#63058) 2022-01-02 21:43:50 +01:00
Allen Porter 15baea4ba3 Use more narrow exception catching in nest (#63225) 2022-01-02 18:54:56 +01:00
Allen Porter ebc8e19788 Revert nest reloading due to lock up (#63206) 2022-01-02 17:08:38 +01:00