1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Add domain key config validation (#104242)

* Drop use of regex in helpers.extract_domain_configs

* Update test

* Revert test update

* Add domain_from_config_key helper

* Add validator

* Address review comment

* Update snapshots

* Inline domain_from_config_key in validator
This commit is contained in:
Erik Montnemery
2023-12-05 15:07:32 +01:00
committed by GitHub
parent 25bea91683
commit 3bcc6194ef
19 changed files with 144 additions and 9 deletions

View File

@@ -2043,7 +2043,7 @@ async def test_component_config_validation_error(
for domain_with_label in config:
integration = await async_get_integration(
hass, domain_with_label.partition(" ")[0]
hass, cv.domain_key(domain_with_label)
)
await config_util.async_process_component_and_handle_errors(
hass,
@@ -2088,7 +2088,7 @@ async def test_component_config_validation_error_with_docs(
for domain_with_label in config:
integration = await async_get_integration(
hass, domain_with_label.partition(" ")[0]
hass, cv.domain_key(domain_with_label)
)
await config_util.async_process_component_and_handle_errors(
hass,