1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-25 05:26:47 +00:00

Use modern platform path when reporting platform config errors (#104238)

* Use modern platform path when reporting platform config errors

* Update tests

* Address review comment

* Explicitly pass platform domain to log helpers

* Revert overly complicated changes

* Try a simpler solution
This commit is contained in:
Erik Montnemery
2023-12-05 15:06:13 +01:00
committed by GitHub
parent db9d6b401a
commit 25bea91683
9 changed files with 89 additions and 60 deletions

View File

@@ -227,7 +227,12 @@ async def test_platform_not_found(hass: HomeAssistant) -> None:
assert res["light"] == []
warning = CheckConfigError(
"Platform error light.beer - Integration 'beer' not found.", None, None
(
"Platform error 'light' from integration 'beer' - "
"Integration 'beer' not found."
),
None,
None,
)
_assert_warnings_errors(res, [warning], [])
@@ -361,7 +366,7 @@ async def test_platform_import_error(hass: HomeAssistant) -> None:
assert res.keys() == {"homeassistant", "light"}
warning = CheckConfigError(
"Platform error light.demo - blablabla",
"Platform error 'light' from integration 'demo' - blablabla",
None,
None,
)