Commit Graph

222 Commits (c4d8cda92be330311fd83809588c7e0131d1c49b)

Author SHA1 Message Date
G Johansson e7f44048e9
Remove _enable_turn_on_off_backwards_compatibility T-Z (#132423) 2024-12-05 21:48:02 +01:00
G Johansson c41cf570d3
Remove deprecated supported features warning in `ClimateEntity` (#132206)
* Remove deprecated features from ClimateEntity

* Remove not needed tests

* Remove add_to_platform_start
2024-12-05 20:37:17 +01:00
Robert Resch 5c8fb5ec2c
Remove deprecated climate constants (#131798)
* Remove deprecated climate constants

* Fix

* Fix

* Fix

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-11-29 00:38:05 +01:00
G Johansson a7db35c76c
Add horizontal swing support to ClimateEntity (#125578)
* Add horizontal swing support to ClimateEntity

* Fixes + tests

* Fixes
2024-11-27 15:06:46 +01:00
Michael Hansen 67e0ccf677
Use exposed error messages in Assist (#127503)
* Use exposed error messages

* Report expose errors

* Remove comment

* Relative import

* Rework expose check logic

* Delay creation of all names list, and skip config/hidden entities

* Clean up commented code and type issue

* Fix test

* Move assistant check
2024-10-11 13:06:03 -04:00
G Johansson c6a1b9fc39
Change Climate set temp action for incorrect feature will raise (#126692)
* Change Climate set temp action for incorrect feature will raise

* Fix some tests

* Fix review comments

* Fix tesla_fleet

* Fix tests

* Fix review comment
2024-09-25 21:16:14 +02:00
G Johansson 03bba6d0c3
Climate check target min lower than target high (#124488)
* Guard target high_temp higher than low_temp in ClimateEntity

* Fixes

* Update string

* Forgot to fix tests
2024-09-24 15:56:30 +02:00
G Johansson 1caed79895
Validate set_humidity in ClimateEntity (#125242)
* Implementation validation for set_humidity in ClimateEntity

* Fixes
2024-09-16 10:09:44 +02:00
G Johansson d259e4512b
Improve logging message for validation in climate (#125837) 2024-09-12 21:41:00 +02:00
G Johansson c21ea6b8da
Validate target temp features in Climate Entity (#125180)
* Validate target temp features in Climate Entity

* Soften

* Break long string
2024-09-12 10:13:19 +02:00
G Johansson c2d5696b5b
Add validation to climate hvac mode (#125178)
* Add validation to climate hvac mode

* Make softer

* Remove string

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-09-08 14:24:12 +02:00
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