1
mirror of https://github.com/home-assistant/core synced 2024-08-15 18:25:44 +02:00
ha-core/tests
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
..
auth Search/replace RESULT_TYPE_* by FlowResultType enum (#74656) 2022-07-07 21:28:18 +02:00
backports
components Set nest entities as unavailable on lost connection (#78773) 2022-09-28 19:23:11 -07:00
fixtures Add device HmIP-STE2-PCB to homematicip_cloud (#75369) 2022-07-25 18:15:02 +02:00
hassfest
helpers Improve check of new_entity_id in entity_registry.async_update_entity (#78276) 2022-09-28 08:43:58 +02:00
pylint Adjust pylint plugin for tests directory (#78727) 2022-09-19 14:27:21 +02:00
resources
scripts
test_util JSON serialize NamedTuple subclasses with aiohttp (#74971) 2022-07-11 14:46:55 -07:00
testing_config Prevent deleting blueprints which are in use (#78444) 2022-09-14 16:47:08 +02:00
util Deprecate conversion utilities (#78957) 2022-09-28 19:39:44 +02:00
__init__.py
bandit.yaml
common.py Make hass.data["mqtt"] an instance of a DataClass (#77972) 2022-09-17 21:43:42 +02:00
conftest.py Fix recorder fixtures (#79147) 2022-09-27 17:00:06 +02:00
ignore_uncaught_exceptions.py
test_bootstrap.py Add a context variable holding a HomeAssistant reference (#76303) 2022-08-22 15:58:01 +02:00
test_config_entries.py Add a helpful message to the config_entries.OperationNotAllowed exception (#78631) 2022-09-17 20:52:28 +03:00
test_config.py Significantly improve yaml load times when the C loader is available (#73337) 2022-06-13 08:44:46 -10:00
test_core.py Fix memory leak when firing state_changed events (#72571) 2022-05-26 20:54:26 -07:00
test_data_entry_flow.py Add a callback for data flow handler removal (#77394) 2022-08-29 16:25:34 -04:00
test_exceptions.py
test_loader.py Change manufacturer_data_first_byte to manufacturer_data_start (#75379) 2022-07-17 17:25:45 -05:00
test_main.py
test_requirements.py Check if requirements are installed in the executor (#71611) 2022-06-13 13:10:05 -07:00
test_runner.py
test_setup.py
test_test_fixtures.py Set cv hass in hass fixture (#77271) 2022-08-25 12:29:31 +02:00