1
0
mirror of https://github.com/home-assistant/core.git synced 2026-06-29 02:36:12 +01:00

145 Commits

Author SHA1 Message Date
Erik Montnemery b6b8391cbf Remove purpose-specific triggers and conditions from labs (#174450) 2026-06-22 16:58:51 +01:00
epenet 90d45432dc Use DOMAIN constant in tests (async_mock_service) (#173002) 2026-06-04 12:35:54 +02:00
Erik Montnemery f8a65a7c6f Rename trigger behavior options (#172348) 2026-05-27 16:01:11 +02:00
Franck Nijhof 88f6b7159a Fix line length violations in tests/components j-l (#170961)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-17 17:16:11 -04:00
epenet 88525955ce Remove import annotations from tests (#169527) 2026-04-30 09:30:46 +02:00
Erik Montnemery aad93fd577 Add tests asserting condition features (#168881) 2026-04-24 18:41:39 +02:00
Erik Montnemery 1e6c832c9a Add tests asserting trigger features (#168407) 2026-04-17 08:37:47 +02:00
Erik Montnemery f84398eb9c Speed up trigger tests (#166522) 2026-03-26 00:51:14 +01:00
Erik Montnemery c8ce4eb32d Deduplicate tests testing conditions in mode all (#165841) 2026-03-17 21:06:26 +01:00
Erik Montnemery 770864082f Deduplicate tests testing conditions in mode any (#165801) 2026-03-17 19:23:47 +00:00
Erik Montnemery fa7a216afe Use return value from target_entities directly in condition tests (#165791) 2026-03-17 14:55:17 +01:00
Erik Montnemery ba30563772 Deduplicate tests testing triggers in mode last (#165789) 2026-03-17 14:28:10 +01:00
Erik Montnemery 6c9fc7c7a1 Deduplicate tests testing triggers in mode first (#165779)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-17 12:44:21 +01:00
Erik Montnemery fdfe87de4c Move condition/trigger test helpers to test.components.common (#165777) 2026-03-17 11:08:38 +01:00
Erik Montnemery 67356de21b Deduplicate tests testing triggers in mode any (#165772) 2026-03-17 10:27:12 +01:00
Erik Montnemery 4769a769e0 Use return value from target_entities directly in all trigger tests (#165761) 2026-03-17 09:55:08 +01:00
Erik Montnemery 9bbd9d8bcd Deduplicate trigger tests checking labs flag (#165760)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-17 08:19:10 +01:00
Erik Montnemery 9913e1397e Add lock conditions (#161383) 2026-01-26 16:28:37 +01:00
Erik Montnemery deefcbcbe4 Remove stub_blueprint_populate test fixture (#161288) 2026-01-20 15:46:06 +01:00
Erik Montnemery f01653633d Add shared enable_experimental_triggers_conditions test fixture (#160937) 2026-01-14 16:01:06 +00:00
Erik Montnemery a902f3bb00 Improve comments in trigger and condition test helpers (#160830) 2026-01-14 11:42:32 +00:00
Erik Montnemery 1e6b0ba9ec Allow passing trigger options to parametrize_trigger_states (#160119) 2026-01-05 10:44:31 +01:00
Michael 6a1d86d5db Add domain driven triggers to lock platform (#159327)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-19 22:34:33 +01:00
G Johansson 3cf035820b Remove deprecated state constants from lock (#153367) 2025-10-01 22:16:52 +02:00
Matthias Alphart 63640af4d4 Update voluptuous-serialize to 2.7.0 (#150822) 2025-08-19 16:42:49 +02:00
epenet 0cf2ee0bcb Remove unnecessary DOMAIN alias in tests (l-r) (#146009)
* Remove unnecessary DOMAIN alias in tests (l-r)

* Keep late import in lirc
2025-06-02 08:54:55 +02:00
epenet c3ade400fb Use Platform constant in tests (#145801)
* Use Platform constant in tests

* spelling

* Fix platform
2025-05-28 15:51:37 +02:00
Erik Montnemery 428cc1a951 Update signature of platforms' async_setup_entry in tests (#138271) 2025-02-11 13:17:39 +01:00
epenet 7b1b229718 Standardize homeassistant imports in component tests (a-l) (#136806) 2025-01-29 10:00:45 +01:00
epenet b43379be7d Standardize helpers.xxx_registry imports (#136688)
Standardize registry imports
2025-01-28 08:48:34 +01:00
epenet 1ec91e7c89 Remove deprecated supported features warning in Lock (#132642) 2024-12-09 08:45:36 +01:00
Robert Resch 1d09a5bf89 Remove deprecated lock constants (#131812) 2024-11-28 12:21:13 +01:00
G Johansson 93aade6e8e Change lock state to an enum (#126379)
* Add new LockState enum for lock states

* Add rest

* Fix insteon tests

* Fix mqtt tests

* Fix tesla_fleet

* Revert back ST_STATE_LOCKED

* Add back constant
2024-09-24 12:30:50 +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 921430d497 Import Generator from collections.abc (3) (#120916) 2024-07-01 12:09:11 +02:00
epenet dc6c1f4e87 Add MockPlatform type hints in tests (#120012)
* Add MockPlatform type hints in tests

* Remove useless code

* Improve

* Revert "Improve"

This reverts commit 9ad04f9255.
2024-06-21 11:04:15 +02:00
epenet abb8c58b87 Fix consider-using-tuple pylint warnings in core tests (#119463) 2024-06-12 12:35:01 +02:00
Marc Mueller 33ed4fd862 Import Generator from typing_extensions (3) (#118990) 2024-06-06 17:28:59 +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
G Johansson 7862596ef3 Add open state to LockEntity (#111968)
* Add `open` state to LockEntity

* Add tests

* Fixes

* Fix tests

* strings and icons

* Adjust demo open lock

* Fix lock and tests

* fix import

* Fix strings

* mute ruff

* Change sequence

* Sequence2

* Group on states

* Fix ruff

* Fix tests

* Add more test cases

* Sorting
2024-05-08 20:42:22 +02:00
Sid 9bf87329da Enable Ruff FLY002 rule (#115112)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
2024-04-12 09:04:16 +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
Sid 00ec7f11f0 Enable Ruff rule PT007 (#113764)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-03-19 09:01:07 +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 1722e23df8 Add empty line after module docstring [tests l-p] (#112710) 2024-03-08 14:55:15 +01:00
Erik Montnemery c805ea7b4f Include deprecated constants in wildcard imports (#107114) 2024-01-05 11:46:45 +01:00
J. Nick Koston 2b972f6dba Add deprecation warning for lock supported features when using magic numbers (#106620) 2023-12-28 15:03:14 -10:00
G Johansson 8cd0644035 Add translation to ServiceValidationError in Lock (#105746) 2023-12-27 12:50:27 +01:00
Robert Resch 491a50a2f1 Deprecate deprecated lock constants (#106113) 2023-12-20 18:07:17 +01:00