Commit Graph

211 Commits (03a6eb26bede9086c3fb12bd45f5324c05a404e5)

Author SHA1 Message Date
G Johansson 2c0c0b9e21
Extend deprecation of aux_heat in ClimateEntity (#125360) 2024-09-05 22:34:35 +02:00
G Johansson 0c8ed18ca5
Use setup_test_component_platform in Climate tests (#123941)
* Use setup_test_component_platform in Climate tests

* Rename mock integration helper

* Change name to register_test_integration

* Change name in tests

* Fix ruff format
2024-08-22 09:38:27 +02:00
epenet 975363b660
Add missing hass type hint in component tests (c) (#124067) 2024-08-18 15:35:31 +02:00
G Johansson a913587eb6
Climate validate temperature(s) out of range (#118649)
* Climate temperature out of range

* Fix test sensibo

* use temp converting for min/max

* Fix

* Fix mqtt tests

* Fix honeywell tests

* Fix Balboa tests

* Fix whirlpool test

* Fix teslemetry test

* Fix plugwise test

* Fix tplink test

* Fix generic thermostat test

* Fix modbus test

* Fix fritzbox tests

* Honewell
2024-07-31 19:17:53 +02:00
Marc Mueller f0b9a806d1
Fix missing type[..] annotation in tests (#122217) 2024-07-20 11:11:16 +02:00
Brent Petit ba5e3ca44b
Remove use of deprecated set_aux_heat call from climate _async_reproduce_states (#121873) 2024-07-19 10:14:12 +02:00
G Johansson ac8ea8356c
Fix unnecessary logging of turn on/off feature flags in Climate (#121387) 2024-07-06 19:32:27 +02:00
epenet 07f095aa42
Use service_calls fixture in core platform tests [a-l] (#120904) 2024-07-01 19:27:50 +02:00
Marc Mueller 2f0dd6f704
Import Generator from collections.abc (2) (#120915) 2024-07-01 11:58:49 +02:00
epenet abb8c58b87
Fix consider-using-tuple pylint warnings in core tests (#119463) 2024-06-12 12:35:01 +02:00
Michael Hansen 87114bf19b
Fix exposure checks on some intents (#118988)
* Check exposure in climate intent

* Check exposure in todo list

* Check exposure for weather

* Check exposure in humidity intents

* Add extra checks to weather tests

* Add more checks to todo intent test

* Move climate intents to async_match_targets

* Update test_intent.py

* Update test_intent.py

* Remove patch
2024-06-06 20:41:25 -05:00
Marc Mueller 279483ddb0
Import Generator from typing_extensions (2) (#118989) 2024-06-06 17:24:22 +02:00
J. Nick Koston ed0568c655
Ensure config entries are not unloaded while their platforms are setting up (#118767)
* Report non-awaited/non-locked config entry platform forwards

Its currently possible for config entries to be reloaded while their platforms
are being forwarded if platform forwards are not awaited or done after the
config entry is setup since the lock will not be held in this case.

In https://developers.home-assistant.io/blog/2022/07/08/config_entry_forwards
we advised to await platform forwards to ensure this does not happen, however
for sleeping devices and late discovered devices, platform forwards may happen
later.

If config platform forwards are happening during setup, they should be awaited

If config entry platform forwards are not happening during setup, instead
async_late_forward_entry_setups should be used which will hold the lock to
prevent the config entry from being unloaded while its platforms are being
setup

* Report non-awaited/non-locked config entry platform forwards

Its currently possible for config entries to be reloaded while their platforms
are being forwarded if platform forwards are not awaited or done after the
config entry is setup since the lock will not be held in this case.

In https://developers.home-assistant.io/blog/2022/07/08/config_entry_forwards
we advised to await platform forwards to ensure this does not happen, however
for sleeping devices and late discovered devices, platform forwards may happen
later.

If config platform forwards are happening during setup, they should be awaited

If config entry platform forwards are not happening during setup, instead
async_late_forward_entry_setups should be used which will hold the lock to
prevent the config entry from being unloaded while its platforms are being
setup

* run with error on to find them

* cert_exp, hold lock

* cert_exp, hold lock

* shelly async_late_forward_entry_setups

* compact

* compact

* found another

* patch up mobileapp

* patch up hue tests

* patch up smartthings

* fix mqtt

* fix esphome

* zwave_js

* mqtt

* rework

* fixes

* fix mocking

* fix mocking

* do not call async_forward_entry_setup directly

* docstrings

* docstrings

* docstrings

* add comments

* doc strings

* fixed all in core, turn off strict

* coverage

* coverage

* missing

* coverage
2024-06-04 21:34:39 -04:00
epenet 7e62061b9a
Improve typing for `calls` fixture in tests (a-l) (#118349)
* Improve typing for `calls` fixture in tests (a-l)

* More

* More
2024-05-29 09:06:48 +02:00
epenet 44f715bd02
Use issue_registry fixture in component tests (#118041) 2024-05-24 15:54:20 +02:00
Michael Hansen 7923471b94
Intent target matching and media player enhancements (#115445)
* Working

* Tests are passing

* Fix climate

* Requested changes from review
2024-05-07 22:01:03 -04:00
J. Nick Koston 81d2f5b791
Small cleanups to climate entity feature compat (#116361)
* Small cleanups to climate entity feature compat

Fix some duplicate property fetches, avoid generating a new
enum every time supported_features was fetched if there was
no modifier

* param

* param
2024-04-29 15:43:55 +02:00
Sid d5f883fbf0
Unignore Ruff PLR in tests (#114470)
* Unignore Ruff PLR in tests

* Address review comments

* review comments

* fix import

* Update test_api.py

* Update test_api.py

* Update test_api.py
2024-04-01 11:11:59 +02:00
G Johansson c21d508c2d
Start deprecation of auxiliary heater in ClimateEntity (#112532)
* Start deprecation of auxiliary heater in ClimateEntity

* No issue for core integrations

* Remove unneded strings

* Move report to state_attributes
2024-03-27 16:10:32 +01:00
Sid 00ec7f11f0
Enable Ruff rule PT007 (#113764)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-03-19 09:01:07 +01:00
Jan Bouwhuis 554aefed42
Generate HomeAssistantError message from English translations (#113305)
* Fetch exception message from translation cache

* Improve tests

* Return translation key without path, cleanup

* Fetch translations when string variant is requested

* Move import

* revert changes ConfigValidationError

* mypy

* Remove _str__ method instead

* Type _message for mqtt template exception classes

* Revert changes made to test_config.py

* Undo changes TemplateError

* Follow up comments and test coverage
2024-03-16 22:56:48 +01:00
Joost Lekkerkerker c75342bd9a
Improve lists in integrations [C-D] (#113072) 2024-03-11 18:58:35 +01:00
Marc Mueller 32f3f46542
Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
Marc Mueller 38adfbf1a3
Add empty line after module docstring [tests a-e] (#112708) 2024-03-08 08:50:25 -05:00
Michael 58a6f26f66
Fix scene activation with climate entities with `None` attribute values (#110684)
don't call service with attribute None
2024-02-16 22:27:55 +01:00
Artur Pragacz 3392660537
Add toggle service to climate (#100418)
* Add toggle service to climate

* Fix mqtt test

* Add comments

* Fix rebase

* Remove not needed properties

* Fix toggle service

* Fix test

* Test

* Mod mqtt test

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-02-16 15:53:48 +01:00
Michael Hansen 1750f54da4
Assist fixes (#109889)
* Don't pass entity ids in hassil slot lists

* Use first completed response

* Add more tests
2024-02-07 15:13:42 -06:00
G Johansson e877113b21
Add back logging for core for feature flags in climate (#109572) 2024-02-04 15:15:00 +01:00
G Johansson 61c82718f2
Don't log warning for core integrations on new feature flags in Climate (#109250)
* Don't log for core integration on Climate new feature flags

* Add test

* Fix test
2024-02-01 16:53:53 +01:00
G Johansson c59345338e
Add test for integration migrated in climate (#109224) 2024-01-31 19:57:59 +01:00
G Johansson ddb56fe20d
Modify climate turn_on/off backwards compatibility check (#109195)
* Modify climate turn_on/off backwards compatibility check

* Fix logger message

* Comments

* Fix demo

* devolo

* ecobee

* Some more

* Fix missing feature flag

* some more

* and some more

* Remove demo change

* Add back demo change

* Fix demo

* Update comments
2024-01-31 16:29:36 +01:00
G Johansson bc720b48b4
Add TURN_OFF and TURN_ON to ClimateEntityFeature (#101673)
* Add ClimateEntityFeature.TURN_OFF

* Fixes

* Fixes

* wording

* Change to services

* Fixing

* Fixing

* Last bits

* Review comments

* Add hvac_modes checks

* Fixes

* Add tests

* Review comments

* Update snapshots

* balboa

* coolmaster

* ecobee

* mqtt

* nest

* plugwise

* smarttub

* whirlpool

* zwave_js

* fix test climate

* test climate

* zwave

* nexia

* nuheat

* venstar

* tado

* smartthings

* self.hvac_modes not None

* more tests

* homekit_controller

* homekit controller snapshot
2024-01-30 15:07:47 +01:00
Erik Montnemery c805ea7b4f
Include deprecated constants in wildcard imports (#107114) 2024-01-05 11:46:45 +01:00
J. Nick Koston 552d4e49f0
Climate platform back-compat for custom components without ClimateEntityFeature (#106605) 2023-12-29 00:36:28 +01:00
G Johansson 83f4d3af5c
Implement mode validation in Climate entity component (#105745)
* Implement mode validation in Climate entity component

* Fix some tests

* more tests

* Fix translations

* fix deconz tests

* Fix switcher_kis tests

* not None

* Fix homematicip_cloud test

* Always validate

* Fix shelly

* reverse logic in validation

* modes_str

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-27 14:51:39 +01:00
Robert Resch 494a897568
Deprecate deprecated climate constants (#106096) 2023-12-21 00:00:21 +01:00
Michael a1614d6b7e
Add significant Change support for climate (#106020) 2023-12-19 12:30:30 +01:00
Michael Hansen 431a44ab67
Add name slot to HassClimateGetTemperature intent (#105585) 2023-12-12 22:54:15 -05:00
Michael Hansen 71268bd407
Add HassClimateGetTemperature intent (#102831) 2023-11-25 14:50:44 +01:00
Erik Montnemery 8da421c442
Use real devices in climate device action tests (#102718) 2023-10-24 23:40:07 +02:00
Erik Montnemery bead989e7f
Use real devices in climate device condition tests (#102705) 2023-10-24 23:29:44 +02:00
Erik Montnemery 13be486d61
Use real devices in climate device trigger tests (#102680) 2023-10-24 21:57:22 +02:00
Franck Nijhof 868a5f377f
Ruff: isort don't split imports based on trailing comma (#98162) 2023-08-10 14:27:03 +02:00
Erik Montnemery c2f7e5840b
Use entity registry id in climate device actions (#95268)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-06-27 09:28:54 +02:00
Erik Montnemery a691846b5d
Use entity registry id in climate device conditions (#95252) 2023-06-26 20:29:28 +02:00
Erik Montnemery f3defff429
Teach climate device trigger about entity registry ids (#94969) 2023-06-21 14:50:21 +02:00
Erik Montnemery 6a29ed8caa
Replace assert_lists_same with pytest_unordered in integrations a-f (#94900) 2023-06-20 20:22:31 +02:00
Erik Montnemery 9a3077d64a
Always setup demo platforms with device support from config entry (#94586)
* Always setup demo platforms with device support from config entry

* Adjust test fixutres

* Update tests depending on the demo integration
2023-06-14 16:50:35 +02:00
Jan Bouwhuis ec98e22330
Add type hints for stub_blueprint_populate fixture (#93568)
Add typehints for stub_blueprint_populate fixture
2023-05-26 08:13:13 +02:00
Erik Montnemery 3cca338c6e
Improve blueprint test fixtures (#93519) 2023-05-25 13:45:19 +02:00