Remove logic converting empty or falsy YAML to empty dict (#103912)

* Correct logic converting empty YAML to empty dict

* Modify according to github comments

* Add load_yaml_dict helper

* Update check_config script

* Update tests
This commit is contained in:
Erik Montnemery
2023-12-05 18:08:11 +01:00
committed by GitHub
parent a8ca73a7dd
commit 5b55c7da5f
20 changed files with 112 additions and 47 deletions

View File

@@ -38,7 +38,7 @@ async def test_yaml_resources_backwards(
) -> None:
"""Test defining resources in YAML ll config (legacy)."""
with patch(
"homeassistant.components.lovelace.dashboard.load_yaml",
"homeassistant.components.lovelace.dashboard.load_yaml_dict",
return_value={"resources": RESOURCE_EXAMPLES},
):
assert await async_setup_component(