Ju5stMe
(Nicolaj Jakobsen)
September 26, 2020, 7:32am
1
Hi
I am new to Home Assistant, and have startet with YAML. It is all working fine, but my UI file is 6-700 lines of code.
Is there a tutorial on home to compress or reuse code? !include and like that?
All I want is to organize it.
Total new to this, be gentle
Nicolaj
Tinkerer
(aka DubhAd on GitHub)
September 26, 2020, 7:48am
2
For !include
see the docs . This is exactly what I’ve done with my config .
If you don’t split it you can use YAML anchors for repeated blocks.
Ju5stMe
(Nicolaj Jakobsen)
September 26, 2020, 7:55am
3
Okay, ill look into that. How does the syntax look like in - !include lovelace/view-home.yaml ?
This does not seem to work for me
How can it be it can’t access the file?
Tinkerer
(aka DubhAd on GitHub)
September 26, 2020, 8:15am
4
Working with images makes it hard, rather than working with text, but …
Your indenting is a train wreck
Is 01view_kitchen.yaml
in /config/lovelace/
?
Ju5stMe
(Nicolaj Jakobsen)
September 26, 2020, 8:17am
5
yes it is
Thanks for taking time for me
I was drunk, wrong file path