From c8882d0ceb69f96d91a665b9b09f1b8d19c2270b Mon Sep 17 00:00:00 2001 From: Rohan Kapoor Date: Wed, 5 Oct 2022 19:18:46 -0700 Subject: [PATCH] Disable C Loader to fix compatibility with >= 2022.7 --- custom_components/lovelace_gen/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/custom_components/lovelace_gen/__init__.py b/custom_components/lovelace_gen/__init__.py index c01fed6..cfb3af9 100644 --- a/custom_components/lovelace_gen/__init__.py +++ b/custom_components/lovelace_gen/__init__.py @@ -64,6 +64,8 @@ def _uncache_file(ldr, node): return f"{path}?{timestamp}" loader.load_yaml = load_yaml +if loader.HAS_C_LOADER: + loader.HAS_C_LOADER = False loader.SafeLineLoader.add_constructor("!include", _include_yaml) loader.SafeLineLoader.add_constructor("!file", _uncache_file)