Organize HA UI YAML mode

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

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.

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


image

How can it be it can’t access the file?

Working with images makes it hard, rather than working with text, but …

  1. Your indenting is a train wreck :wink:
  2. Is 01view_kitchen.yaml in /config/lovelace/?

yes it is :slight_smile:
Thanks for taking time for me

I was drunk, wrong file path :smiley: