As mentioned before, I am having issues getting this card to work with any version of HA above 0.106.6.
I am surprised others donât seem to experience issues, so perhaps I am doing something wrong.
I stripped my Lovelace configuration to a single view home.yaml
, consisting of:
# lovelace_gen
title: home
path: home
cards:
- !include
- ../templates/test.yaml
- text: 'hello world'
content of templates/test.yaml
:
# lovelace_gen
type: markdown
content: '##### {{ text }}'
Initially, this seems to work well (after refreshing Lovelace, I get a page with a single header showing âhello worldâ).
But after a reboot, HA completely breaks down, half the components fail to load and it decides to load into safe mode.
Startup logs:
2020-07-05 14:11:58 ERROR (MainThread) [homeassistant.setup] Error during setup of component lovelace
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 193, in _async_setup_component
result = await asyncio.wait_for(task, SLOW_SETUP_MAX_WAIT)
File "/usr/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
return fut.result()
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/lovelace/__init__.py", line 97, in async_setup
resource_collection = await create_yaml_resource_col(hass, yaml_resources)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/lovelace/__init__.py", line 222, in create_yaml_resource_col
ll_conf = await default_config.async_load(False)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/lovelace/dashboard.py", line 186, in async_load
self._load_config, force
File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/lovelace/dashboard.py", line 204, in _load_config
config = load_yaml(self.path)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/util/yaml/loader.py", line 61, in load_yaml
return yaml.load(conf_file, Loader=SafeLineLoader) or OrderedDict()
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/__init__.py", line 114, in load
return loader.get_single_data()
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 51, in get_single_data
return self.construct_document(node)
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 55, in construct_document
data = self.construct_object(node)
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/util/yaml/loader.py", line 192, in _ordered_dict
nodes = loader.construct_pairs(node)
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 155, in construct_pairs
value = self.construct_object(value_node, deep=deep)
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/util/yaml/loader.py", line 223, in _construct_seq
(obj,) = loader.construct_yaml_seq(node)
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 408, in construct_yaml_seq
data.extend(self.construct_sequence(node))
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 130, in construct_sequence
for child in node.value]
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 130, in <listcomp>
for child in node.value]
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/util/yaml/loader.py", line 113, in _include_yaml
return _add_reference(load_yaml(fname), loader, node)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/util/yaml/loader.py", line 61, in load_yaml
return yaml.load(conf_file, Loader=SafeLineLoader) or OrderedDict()
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/__init__.py", line 114, in load
return loader.get_single_data()
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 51, in get_single_data
return self.construct_document(node)
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 55, in construct_document
data = self.construct_object(node)
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/util/yaml/loader.py", line 192, in _ordered_dict
nodes = loader.construct_pairs(node)
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 155, in construct_pairs
value = self.construct_object(value_node, deep=deep)
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/util/yaml/loader.py", line 223, in _construct_seq
(obj,) = loader.construct_yaml_seq(node)
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 408, in construct_yaml_seq
data.extend(self.construct_sequence(node))
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 130, in construct_sequence
for child in node.value]
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 130, in <listcomp>
for child in node.value]
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/util/yaml/loader.py", line 192, in _ordered_dict
nodes = loader.construct_pairs(node)
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 155, in construct_pairs
value = self.construct_object(value_node, deep=deep)
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/util/yaml/loader.py", line 223, in _construct_seq
(obj,) = loader.construct_yaml_seq(node)
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 408, in construct_yaml_seq
data.extend(self.construct_sequence(node))
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 130, in construct_sequence
for child in node.value]
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 130, in <listcomp>
for child in node.value]
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/util/yaml/loader.py", line 192, in _ordered_dict
nodes = loader.construct_pairs(node)
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 155, in construct_pairs
value = self.construct_object(value_node, deep=deep)
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/util/yaml/loader.py", line 223, in _construct_seq
(obj,) = loader.construct_yaml_seq(node)
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 408, in construct_yaml_seq
data.extend(self.construct_sequence(node))
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 130, in construct_sequence
for child in node.value]
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 130, in <listcomp>
for child in node.value]
File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/util/yaml/loader.py", line 111, in _include_yaml
fname = os.path.join(os.path.dirname(loader.name), node.value)
File "/usr/lib/python3.7/posixpath.py", line 94, in join
genericpath._check_arg_types('join', a, *p)
File "/usr/lib/python3.7/genericpath.py", line 149, in _check_arg_types
(funcname, s.__class__.__name__)) from None
TypeError: join() argument must be str or bytes, not 'list'
2020-07-05 14:12:00 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of frontend. Setup failed for dependencies: lovelace
2020-07-05 14:12:00 ERROR (MainThread) [homeassistant.setup] Setup failed for frontend: Could not set up all dependencies.
2020-07-05 14:12:01 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of panel_iframe. Setup failed for dependencies: frontend
2020-07-05 14:12:01 ERROR (MainThread) [homeassistant.setup] Setup failed for panel_iframe: Could not set up all dependencies.
2020-07-05 14:12:01 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of map. Setup failed for dependencies: frontend
2020-07-05 14:12:01 ERROR (MainThread) [homeassistant.setup] Setup failed for map: Could not set up all dependencies.
2020-07-05 14:12:01 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of lovelace_gen. Setup failed for dependencies: lovelace
2020-07-05 14:12:01 ERROR (MainThread) [homeassistant.setup] Setup failed for lovelace_gen: Could not set up all dependencies.
2020-07-05 14:12:01 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of hacs. Setup failed for dependencies: frontend, lovelace
2020-07-05 14:12:01 ERROR (MainThread) [homeassistant.setup] Setup failed for hacs: Could not set up all dependencies.
2020-07-05 14:12:02 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of logbook. Setup failed for dependencies: frontend
2020-07-05 14:12:02 ERROR (MainThread) [homeassistant.setup] Setup failed for logbook: Could not set up all dependencies.
Iâm not much of a programmer, but it seems to me that at startup HA tries to load the yaml files using its built-in parser, which does not support passing more than one argument in the !include
method. I tried moving the lovelace_gen:
definition in configuration.yaml all the way to the top, but it does not seem to change the order in which things are loaded.
How are others using this plugin without this issue?
Any suggestions of things I could try to pinpoint the problem?