core/tests/components/nest
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
..
__init__.py
common.py Update pyupgrade to v2.37.1 (#74989) 2022-07-11 16:54:01 +02:00
conftest.py Allow multiple configuration entries for nest integration (#73720) 2022-06-21 16:36:13 +02:00
test_api.py Add application credentials platform for nest and deprecate yaml for SDM API (#73050) 2022-06-15 07:15:53 -07:00
test_camera_sdm.py Migrate nest to new entity naming style (#74724) 2022-07-09 19:21:53 +02:00
test_climate_sdm.py Set nest entities as unavailable on lost connection (#78773) 2022-09-28 19:23:11 -07:00
test_config_flow_legacy.py Search/replace RESULT_TYPE_* by FlowResultType enum (#74642) 2022-07-07 19:57:36 +03:00
test_config_flow_sdm.py Fix reauth step in nest (#74090) 2022-06-28 10:06:05 +02:00
test_device_info.py
test_device_trigger.py Update more nest tests to use common fixtures (#73303) 2022-06-10 07:14:43 +02:00
test_diagnostics.py Add application credentials platform for nest and deprecate yaml for SDM API (#73050) 2022-06-15 07:15:53 -07:00
test_events.py Migrate nest to new entity naming style (#74724) 2022-07-09 19:21:53 +02:00
test_init_legacy.py Allow legacy nest integration with no configuration.yaml (#74222) 2022-06-30 08:54:51 +02:00
test_init_sdm.py Allow multiple configuration entries for nest integration (#73720) 2022-06-21 16:36:13 +02:00
test_local_auth.py
test_media_source.py Adjust root-import in nest tests (#78769) 2022-09-19 15:41:45 +02:00
test_sensor_sdm.py Set nest entities as unavailable on lost connection (#78773) 2022-09-28 19:23:11 -07:00