Suppose you have this simple view in your “raw configuration” editor
views:
- title: A
cards:
- type: markdown
content: '**A**'
- title: B
cards:
- type: markdown
content: '**B**'
Now you want to add a third view, but you want that yaml to be read from a file, so you create
c.yaml
- title: C
cards:
- type: markdown
content: '**C**'
How can I include the contents of this file in the raw config? Something like this?
views:
- title: A
cards:
- type: markdown
content: '**A**'
- title: B
cards:
- type: markdown
content: '**B**'
!import /config/c.yaml
1 Like
I have all my views in separate files and this works:
views:
- !include ./views/multiroom-audio.yaml
I think you ahould be able to mix and match
Are you using storage mode?
swipe_nav:
animate: flip
swipe_amount: 10
skip_tabs: '1,2,3,4,5,7'
title: N Oakland St
views:
- title: A
cards:
- type: markdown
content: '**A**'
- title: B
cards:
- type: markdown
content: '**B**'
- !include ./views/c.yaml
Unable to parse YAML: YAMLException: unknown tag !<!include> at line 15, column 28: - !include ./views/c.yaml ^
Now c.yaml doesn’t exist, but that’s a syntax error?
Do you get this error in your editor or from Home Assistant?
In the HA raw configuration editor
Dotly
8
I don’t think !include works when you are configuring using the UI. I could be wrong though