Closed CM000n closed 5 years ago
Looks like your assessment is correct. You may be able to just remove the cards: lines and get it to load
im having the same issue
Similar issue here 81.5. I've found if I cut the Lovelace yaml file down to just one or two pages it works ok, the issue seems to be related to multi-page files. Attached is my file, just with security related items deleted and replace with xxxxxxxxxxxxxx The heating and lighting devices are KNX ui-lovelace.txt
Same issue here. My ui-lovelace has cards: !include
Replacing the card lines from the empty views fixed this completely for me. Thank you all!
Hi, could you explain what "Replacing the card lines from the empty views" Apologies for being rather thick! :-) A worked example would be most appreciated.
Hi @G8YTZ
it's pretty simple.
I just deleted the cards
entry from empty vies like this
- name: Systemstatus
id: systemstatus
icon: mdi:server-network
panel: false
cards:
You mean the statement cards: like my above example?
yes
HA Version: 0.108.0
I'm also having the same issue with the !include
statement. It causes lovelace to crash during startup:
2020-05-02 12:10:11 ERROR (MainThread) [homeassistant.setup] Error during setup of component lovelace
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 171, in _async_setup_component
hass, processed_config
File "/usr/src/homeassistant/homeassistant/components/lovelace/__init__.py", line 97, in async_setup
resource_collection = await create_yaml_resource_col(hass, yaml_resources)
File "/usr/src/homeassistant/homeassistant/components/lovelace/__init__.py", line 222, in create_yaml_resource_col
ll_conf = await default_config.async_load(False)
File "/usr/src/homeassistant/homeassistant/components/lovelace/dashboard.py", line 186, in async_load
self._load_config, force
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/lovelace/dashboard.py", line 204, in _load_config
config = load_yaml(self.path)
File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 61, in load_yaml
return yaml.load(conf_file, Loader=SafeLineLoader) or OrderedDict()
File "/usr/local/lib/python3.7/site-packages/yaml/__init__.py", line 114, in load
return loader.get_single_data()
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 51, in get_single_data
return self.construct_document(node)
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 55, in construct_document
data = self.construct_object(node)
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 195, in _ordered_dict
nodes = loader.construct_pairs(node)
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 155, in construct_pairs
value = self.construct_object(value_node, deep=deep)
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 172, in _include_dir_list_yaml
for f in _find_files(loc, "*.yaml")
File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 173, in <listcomp>
if os.path.basename(f) != SECRET_YAML
File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 61, in load_yaml
return yaml.load(conf_file, Loader=SafeLineLoader) or OrderedDict()
File "/usr/local/lib/python3.7/site-packages/yaml/__init__.py", line 114, in load
return loader.get_single_data()
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 51, in get_single_data
return self.construct_document(node)
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 55, in construct_document
data = self.construct_object(node)
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 195, in _ordered_dict
nodes = loader.construct_pairs(node)
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 155, in construct_pairs
value = self.construct_object(value_node, deep=deep)
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 226, in _construct_seq
(obj,) = loader.construct_yaml_seq(node)
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 408, in construct_yaml_seq
data.extend(self.construct_sequence(node))
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 130, in construct_sequence
for child in node.value]
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 130, in <listcomp>
for child in node.value]
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 195, in _ordered_dict
nodes = loader.construct_pairs(node)
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 155, in construct_pairs
value = self.construct_object(value_node, deep=deep)
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 226, in _construct_seq
(obj,) = loader.construct_yaml_seq(node)
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 408, in construct_yaml_seq
data.extend(self.construct_sequence(node))
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 130, in construct_sequence
for child in node.value]
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 130, in <listcomp>
for child in node.value]
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 195, in _ordered_dict
nodes = loader.construct_pairs(node)
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 155, in construct_pairs
value = self.construct_object(value_node, deep=deep)
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 226, in _construct_seq
(obj,) = loader.construct_yaml_seq(node)
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 408, in construct_yaml_seq
data.extend(self.construct_sequence(node))
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 130, in construct_sequence
for child in node.value]
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 130, in <listcomp>
for child in node.value]
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 195, in _ordered_dict
nodes = loader.construct_pairs(node)
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 155, in construct_pairs
value = self.construct_object(value_node, deep=deep)
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 226, in _construct_seq
(obj,) = loader.construct_yaml_seq(node)
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 408, in construct_yaml_seq
data.extend(self.construct_sequence(node))
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 130, in construct_sequence
for child in node.value]
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 130, in <listcomp>
for child in node.value]
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 195, in _ordered_dict
nodes = loader.construct_pairs(node)
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 155, in construct_pairs
value = self.construct_object(value_node, deep=deep)
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 226, in _construct_seq
(obj,) = loader.construct_yaml_seq(node)
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 408, in construct_yaml_seq
data.extend(self.construct_sequence(node))
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 130, in construct_sequence
for child in node.value]
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 130, in <listcomp>
for child in node.value]
File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 114, in _include_yaml
fname = os.path.join(os.path.dirname(loader.name), node.value)
File "/usr/local/lib/python3.7/posixpath.py", line 94, in join
genericpath._check_arg_types('join', a, *p)
File "/usr/local/lib/python3.7/genericpath.py", line 153, in _check_arg_types
(funcname, s.__class__.__name__)) from None
TypeError: join() argument must be str or bytes, not 'list'
Debugging, I've narrowed it down to this yaml file below, due to these !include
statements
#lovelace-gen
title: Sistema
icon: mdi:server
cards:
- type: custom:layout-card
layout: horizontal
cards:
- type: custom:layout-card
layout: vertical
style: !include ../styles/card.yaml
cards:
- type: markdown
content: Sistema e Monitoria
style: !include ../styles/title.yaml
- type: custom:vertical-stack-in-card
cards:
- type: horizontal-stack
cards:
- !include
- ../templates/graphs_embeded.yaml
- entity: sensor.processor_use
name: CPU
hours_to_show: 12
points_per_hour: 4
line_color: var(--custom_graph_color_1)
- !include
- ../templates/graphs_embeded.yaml
- entity: sensor.memory_use_percent
name: Memória
hours_to_show: 12
points_per_hour: 4
line_color: var(--custom_graph_color_2)
- !include
- ../templates/graphs_embeded.yaml
- entity: sensor.disk_use_percent
name: I/O
hours_to_show: 12
points_per_hour: 4
line_color: var(--custom_graph_color_3)
- type: entities
style: !include ../styles/entities_embeded.yaml
entities:
- sensor.cpu_temp
- sensor.database_size
- sensor.hass_io_uptime_pretty
- type: custom:layout-card
layout: vertical
style: !include ../styles/card.yaml
cards:
- type: markdown
content: Rede e Internet
style: !include ../styles/title.yaml
- type: custom:vertical-stack-in-card
cards:
- type: entities
title: Google Wifi
show_header_toggle: false
entities:
- entity: sensor.google_wifi_status
- entity: sensor.google_wifi_local_ip
- entity: sensor.google_wifi_uptime
- entity: sensor.google_wifi_last_restart
- type: entities
title: SpeedTest
show_header_toggle: false
entities:
- entity: sensor.speedtest_download
- entity: sensor.speedtest_upload
- entity: sensor.speedtest_ping
@CM000n Do you also see invalid YAML here?
@G8YTZ
I've found if I cut the Lovelace yaml file down to just one or two pages it works ok. the issue seems to be related to multi-page files
Could you please clarify what you mean here? Can't we split the configuration into several files anymore?
@jimpastos Have you managed to solve the issue with !inlcude
?
I have a strong indication that this is a bug because the issue only happens on startup.
If I comment this whole file out, let HA startup, and then add it back, lovelace can load it properly.
I managed to solve the issue after the update to 109.0 and moving the components section from lovelace-ui.yaml to the main configuration.yaml file
Thanks!
Home Assistant release with the issue: 0.81.0
Last working Home Assistant release (if known): 0,80.3
Operating environment (Hass.io/Docker/Windows/etc.): Docker on Debian
Component/platform: https://www.home-assistant.io/lovelace/
Description of problem:
Since 0.81 my Lovelace UI isn’t loading anymore. I have some empty views as placeholders in my ui-lavelace.yaml, cause it’s still wip. Maybe that’s the problem? But before 0.81 everything wors fine.
Problem-relevant
ui-lavelace.yaml
:Traceback Logs: