Commit Graph
162 Commits
Author SHA1 Message Date
Erik MontnemeryandGitHub 57041e71d8 Make entity_platform check entity can attach to device (#177459) 2026-07-28 19:51:01 +02:00
Erik MontnemeryandGitHub 6d8c190b4b Exempt certain protocol integrations from entity limit (#176973) 2026-07-21 11:54:47 +02:00
G JohanssonandGitHub 5ec3d4d5ef Remove deprecated props from entity platform (#175606) 2026-07-08 23:31:21 +02:00
Erik MontnemeryandGitHub 34679b033a Improve tests of entity limits (#174793) 2026-06-25 20:23:50 +02:00
Martin HjelmareandGitHub c9d91d5812 Add enabled entity limit per config entry (#174194) 2026-06-24 16:07:54 +02:00
3fee05db71 Add entity_platform helper function to create issues when platform setup is not supported by integration (#171105)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-19 21:08:03 +02:00
Artur PragaczandGitHub f823ef639a Prefix area to entity ID (#170560) 2026-05-19 20:53:26 +02:00
Franck NijhofGitHubcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>frenck
9a1fd913bf Fix line length violations in tests (non-components) (#170804)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: frenck <195327+frenck@users.noreply.github.com>
2026-05-17 10:30:45 -04:00
dc4210595f Fix flaky test_set_scan_interval_via_platform (#169856)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 20:49:15 +02:00
Ariel EbersbergerandGitHub cd15261d1c Fix helper tests for Python 3.14.3 (#168355) 2026-04-16 15:56:50 +02:00
Artur PragaczandGitHub cb71628ee2 Validate entity ID domain (#167228) 2026-04-07 12:36:37 +02:00
Artur PragaczandGitHub 151eae4d5a Add compatibility layer for entities without has_entity_name to entity registry (#166246) 2026-03-24 20:22:15 +01:00
Artur PragaczandGitHub bafef2065f Rework user-given entity name logic (#162763) 2026-03-17 11:09:20 +01:00
Artur PragaczandGitHub f2d4319366 Make bad entity ID detection more lenient (#162425) 2026-02-06 15:58:27 +01:00
Artur PragaczandGitHub 0130919128 Improve entity id generation (#160302) 2026-01-14 14:34:52 +01:00
e0484ba1ff Improve dev error message for YAML platform setup missing method (#155505)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2025-12-04 20:06:37 +01:00
10299b2ef4 Add description placeholders to service translation strings (#154984)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2025-11-26 09:54:22 +01:00
G JohanssonandGitHub 5ccbee4c9a Break long strings in entity platform/component tests (#152320) 2025-09-14 23:27:04 +02:00
G JohanssonandGitHub af9717c1cd Raise error for entity services without a correct schema (#151165) 2025-09-14 19:17:26 +02:00
Erik MontnemeryandGitHub dd399ef59f Refactor EntityPlatform (#147927) 2025-07-22 14:35:57 +02:00
Erik MontnemeryandGitHub 4e1d5fbeb0 Add WS command to help reset custom entity_id (#145504)
* Add WS command to help reset custom entity_id

* Calculate suggested object id from entity properties

* Fix logic and add additional tests

* Adjust test

* Update folder_watcher test

* Handle current entity id matches the automatic entity id

* Don't store calculated_object_id

* Update snapshots

* Update snapshots

* Update test

* Tweak logic for reusing current entity_id

* Improve test

* Don't assign same entity_id to several entities

* Prioritize custom entity name

* Update snapshots

* Update snapshots
2025-05-26 19:28:27 +02:00
Erik MontnemeryandGitHub 158bbf1f52 Remove unused constant from entity_platform tests (#144601) 2025-05-11 17:33:09 +02:00
Erik MontnemeryandGitHub dc8e1773f1 Remove unused defaults from entity_registry.RegistryEntry (#143655) 2025-04-25 12:41:58 +02:00
Erik MontnemeryandGitHub ba583cc669 Add test for trying to add an entity to an unknown config subentry (#138211) 2025-02-10 19:21:43 -05:00
4b34d1bbb5 Merge config subentry feature branch to dev (#136121)
* Reapply "Add support for subentries to config entries" (#133470) (#136061)

* Reapply "Add support for subentries to config entries" (#133470)

This reverts commit ecb3bf79f3.

* Update test snapshot

* Add config subentry support to device registry (#128157)

* Add config subentry support to device registry

* Apply suggestions from code review

* Update syrupy serializer

* Update snapshots

* Address review comments

* Allow a device to be connected to no or a single subentry of a config entry

* Update snapshots

* Revert "Allow a device to be connected to no or a single subentry of a config entry"

This reverts commit ec6f613151cb4a806b7961033c004b71b76510c2.

* Update test snapshots

* Bump release version in comments

* Rename config_subentries to config_entries_subentries

* Add config subentry support to entity registry (#128155)

* Add config subentry support to entity registry

* Update syrupy serializer

* Update snapshots

* Update snapshots

* Accept suggested changes

* Clean registries when removing subentry (#136671)

* Clean up registries when removing subentry

* Update tests

* Clean up subentries from deleted devices when removing config entry (#136669)

* Clean up subentries from deleted devices when removing config entry

* Move

* Add config subentry support to entity platform (#128161)

* Add config subentry support to entity platform

* Rename subentry_id to config_subentry_id

* Store subentry type in subentry (#136687)

* Add reconfigure support to config subentries (#133353)

* Add reconfigure support to config subentries

* Update test

* Minor adjustment

* Rename supported_subentry_flows to supported_subentry_types

* Address review comments

* Add subentry support to kitchen sink (#136755)

* Add subentry support to kitchen sink

* Add subentry reconfigure support to kitchen_sink

* Update kitchen_sink tests with subentry type stored in config entry

* Update kitchen_sink

* Update kitchen_sink

* Adjust kitchen sink tests

* Fix hassfest

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Improve docstrings and strings.json

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-02-10 16:40:07 +01:00
epenetandGitHub 364556a7dd Prefer from...import...as over import...as in core tests (#136146) 2025-01-21 09:28:17 +01:00
Erik MontnemeryandGitHub 235fda55fe Validate config entry when adding or updating entity registry entry (#135067) 2025-01-17 19:18:13 +01:00
Erik MontnemeryandGitHub 9ff35d5a5a Minor improvement of entity platform tests (#128158)
* Minor improvement of entity platform tests

* Fix snapshot
2024-10-11 14:14:29 +02:00
114e254aa6 Don't raise when registering entity service with invalid schema (#125057)
* Don't raise when registering entity service with invalid schema

* Update homeassistant/helpers/service.py

Co-authored-by: Robert Resch <robert@resch.dev>

---------

Co-authored-by: Robert Resch <robert@resch.dev>
2024-09-02 14:20:50 +02:00
55c42fde88 Improve validation of entity service schemas (#124102)
* Improve validation of entity service schemas

* Update tests/helpers/test_entity_platform.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-08-27 19:05:49 +02:00
epenetandGitHub 56b4a7f291 Add missing hass type in tests/helpers (#124039) 2024-08-16 17:09:12 +02:00
Erik MontnemeryandGitHub 14a3217d7e Improve entity platform tests (#124051) 2024-08-16 15:08:37 +02:00
f9ade788eb Do sanity check EntityPlatform.async_register_entity_service schema (#123058)
* Do a sanity check of schema passed to EntityPlatform.async_register_entity_service

* Only attempt to check schema of Schema

* Handle All/Any wrapped in schema

* Clarify comment

* Apply suggestions from code review

Co-authored-by: Robert Resch <robert@resch.dev>

---------

Co-authored-by: Robert Resch <robert@resch.dev>
2024-08-16 10:01:12 +02:00
Erik MontnemeryandGitHub 7063541733 Support None schema in EntityPlatform.async_register_entity_service (#123064) 2024-08-14 10:46:29 +02:00
Robert ReschandGitHub 0d765a27c9 Add created_at/modified_at to entity registry (#122444) 2024-07-23 13:12:29 +02:00
Marc MuellerandGitHub a6068dcdf2 Update import locations in tests (#122216) 2024-07-20 11:16:04 +02:00
9bbeb5d608 Add primary_config_entry attribute to device registry entries (#119959)
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Robert Resch <robert@resch.dev>
2024-06-26 12:26:24 +02:00
epenetandGitHub 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
Paulus SchoutsenandGitHub eb89ce47ea Inline primary integration (#119860) 2024-06-18 08:08:08 +02:00
Paulus SchoutsenandGitHub 836abe68c7 Track primary integration (#119741)
* Track primary integration

* Update snapshots

* More snapshots updated

* Uno mas

* Update snapshot
2024-06-16 13:26:06 -04:00
epenetandGitHub abb8c58b87 Fix consider-using-tuple pylint warnings in core tests (#119463) 2024-06-12 12:35:01 +02:00
epenetandGitHub 7d631c28a6 Ignore attribute-defined-outside-init pylint warnings in tests (#119470) 2024-06-12 12:22:31 +02:00
SidandGitHub 721b2c2ca8 Enable Ruff PT012 (#113957) 2024-06-08 17:59:08 +02:00
J. Nick KostonandGitHub d7aa24fa50 Only load translations for an integration once per test session (#117118) 2024-05-11 12:00:02 +09:00
J. Nick KostonandGitHub b41b1bb998 Refactor entity_platform polling to avoid double time fetch (#116877)
* Refactor entity_platform polling to avoid double time fetch

Replace async_track_time_interval with loop.call_later
to avoid the useless time fetch every time the listener
fired since we always throw it away

* fix test
2024-05-05 16:28:01 -04:00
J. Nick KostonandGitHub 6bd6adc4f5 Avoid calling valid_entity_id when adding entities if they are already registered (#115388) 2024-04-10 15:18:47 -10:00
J. Nick KostonandGitHub 89a2c89fe2 Avoid checking for polling if an entity fails to add (#115159)
* Avoid checking for polling if an entity fails to add

* no need to do protected access

* no need to do protected access

* no need to do protected access

* no need to do protected access

* coverage

* fix test

* fix

* broken one must be first
2024-04-07 21:25:55 -04:00
Jan-Philipp BeneckeandGitHub 5c97049f2e Do not override state property in MockEntity (#114231)
Do not override state in `MockEntity`
2024-03-27 11:36:00 +01:00
6bb4e7d62c Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
00ec7f11f0 Enable Ruff rule PT007 (#113764)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-03-19 09:01:07 +01:00