Commit Graph

13 Commits (78e29d526c178c2eaceda031ab3c9d126ebea654)

Author SHA1 Message Date
epenet 50cbabb2d8
Add type hints to integration tests (part 15) (#88006) 2023-02-15 10:00:49 +01:00
Franck Nijhof ca1a12898c
Enable Ruff D212 (#87347) 2023-02-03 23:08:48 +01:00
PeteRager d22e670334
Avoid Nest climate set_temperature eating error (#86920)
* Update climate_sdm.py

* Update test case to detect KeyError

* Throw a defined exception if the condition in encoutered

Include keys from device_traits in error message

* Less diagnostic information in error message
2023-01-30 08:01:41 -08:00
PeteRager a7ddd592fb
Nest improve error message on climate actions (#86853)
* Nest - Climate - Error Messages

1. Error messages were incorrect for some methods, for example async_set_temperature was reporting failure to set hvac_mode. This is corrected.
2. Error messages were incomplete and were not including the entity_id,and the operation being performed that failed.
3. Add unit tests to test the exception handling

* Move tests into exiisting error test

* Improve readability of error message
2023-01-28 12:58:28 -08:00
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
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 c181af92a2
Throw nest climate API errors as HomeAssistantErrors (#72474) 2022-05-25 13:00:48 -07:00
Allen Porter f3add292d5
Update nest climate set_temperature to allow hvac_mode (#66909) 2022-02-19 20:57:29 -08: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 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 400e85a299
Rename tests filenames to conform to Home Assistant standards (#58266) 2021-10-22 22:25:55 -07:00