Home Assistant 101: Splitting Your Configuration

Sdílet
Vložit
  • čas přidán 27. 07. 2024
  • Instead of one large configuration file, you can split up your Home Assistant configuration into multiple smaller files allowing you to organize, document and manage your YAML in a much more intuitive way. In this video, and upon request from many of you, I'll cover what you need to know about YAML to split your configuration and then show you the step-by-step process to split up your own configuration.
    Chapter Links:
    =============
    00:00 Intro
    01:04 The Home Assistant configuration file
    02:04 YAML basics and concepts
    04:12 Selecting an editor
    06:15 Backup, backup, backup!
    07:05 Splitting Integrations into Individual Files
    12:57 Using folders and multiple files
    18:00 Types of include statements
    19:00 Using the UI editor to create YAML
    22:00 Other alternatives
    Addtional Links and Info:
    ========================
    UUID Generator: www.uuidgenerator.net/
    Home Assistant Split Config Doc: www.home-assistant.io/docs/co...
    Notepad++: notepad-plus-plus.org/
    If you'd like to help support this channel, or just say thanks, you can consider buying me a cup of coffee:
    www.buymeacoffee.com/resinche...
    #homeassistant #yaml
  • Věda a technologie

Komentáře • 25

  • @jamegrabham9992
    @jamegrabham9992 Před 5 měsíci +1

    I really appreciate your YT videos…it goes to my level of understanding…thank you, thank you😊

    • @ResinChemTech
      @ResinChemTech  Před 5 měsíci +2

      You are very welcome! Glad you are finding them helpful. While it does tend to make my videos a bit longer, I do try to cover all the details I think someone might want to know, and then provide the timeline chapter links for those that may already have an understanding of a concept and want to skip over it.
      Thanks for watching and taking the time to leave a comment!

  • @seth2389
    @seth2389 Před 5 měsíci

    Such a 'friendly' way to explain and navigate the treacherous waters of yaml files. Spot-on delivery there. You keep getting better...and better!

    • @ResinChemTech
      @ResinChemTech  Před 5 měsíci

      Thanks Seth! It took me a bit to recall all the various details since I originally split my configuration a number of years ago (and have mostly moved to packages since then... another upcoming video 😉). But I do remember being very confused by the video I was following at the time (why merge_list vs. merge_named?). So I tried to take it from a perspective of someone that might not have a lot of YAML/configuration experience.
      As always, I greatly appreciate the comment!

  • @kevinhenryviii
    @kevinhenryviii Před 5 měsíci +1

    Excellent and easy explanation. Thanks👍🏻

    • @ResinChemTech
      @ResinChemTech  Před 5 měsíci +2

      You are welcome. I'm glad that you found the explanation made sense. When I first did this a few years ago, I thought the guide I was following was very confusing at times. So I thought maybe I'd try to create one that explained why things were done in certain ways.. and the different options you might have for organizing your own configuration.
      Thanks for watching!

  • @kevinhilton8683
    @kevinhilton8683 Před 5 měsíci +1

    Really like your content.

  • @acerot
    @acerot Před 5 měsíci +1

    Perfect clear explanation. A few points I missed:
    - split files can be empty so you can prepare folders/files structure in advance.
    - folders/files names don't matter
    - folder structure can be multilevel, files may be on any level
    You may want to look at splitting configuration in case of the new template integration as this one is a bit tricky (especially if you want to use trigger based template sensors).

    • @ResinChemTech
      @ResinChemTech  Před 5 měsíci

      Thanks, but I'm pretty sure I did cover or at least mentioned a couple of those points. I did say that you could create empty YAML files for integrations that don't currently have any entities (or you could wait until you add entities... either way).
      I also at least implied at the end that you could create any sort of structure you wanted in terms of folders, single files, etc. This would include nested folders (if that's the way you want to do it). Not really sure what you mean by folders/file names don't matter... other than, yes, you can call them whatever you want, but it does matter in terms of the type of include statement you use (which I talk about as well).
      I appreciate the feedback. Obviously it simply isn't practical to discuss every possible permutation or way of doing something in Home Assistant since there is often multiple way... or can vary based on a particular installation... without making the video two hours long. That's why I didn't get into nested folders, with the implication that you specify the path to the folder that contains the files/folder to merge. I also didn't cover the fact that an 'included' file can contain additional includes. I try to target beginner or maybe lower intermediate level users (without overwhelming them), so I try to show the basics and at least mention that they are 'other ways' and will usually include links in the video description for those that want to explore further.
      I split my configuration years ago and have since moved on to almost all my configuration being in packages.. so I'm sure there were a few points I might have missed since this process was a couple years old in my mind.
      Thanks for watching.

  • @Wandering_Kerrs
    @Wandering_Kerrs Před 5 měsíci

    Thanks! Very concise and easy to understand. I needed this about a year and a half ago. LOL Learned a lot about splitting the automation.yaml file too, which I did not know you could do. Again Thank You!

    • @ResinChemTech
      @ResinChemTech  Před 5 měsíci

      You are welcome. I split mine a number of years back (well before there was a UI editor and you HAD to do all your automations in YAML. I tried to follow a video at that time, but it was really confusing, especially why you'd use _merge_dir vs. _merge_named. It was more like "just do what I say", but don't ask why!
      I still have a few things in individual YAML files, but have pretty much migrated most of my configuration to packages at this point. There are pros and cons to packages and I may do a video on those somewhere down the road.
      Thanks for watching and taking time to leave a comment. I appreciate it!

  • @rodneysmith1750
    @rodneysmith1750 Před 5 měsíci

    Great video today, something I have needed to do for a while now, thanks again for sharing!

    • @ResinChemTech
      @ResinChemTech  Před 5 měsíci +1

      Thanks Rodney! A few people had requested that a make a video on this topic. I split mine a few years ago (and have moved on mainly to packages since then), so I had to dig through the old cobwebs to remember a few of the details!

  • @safwaniiiiiiz
    @safwaniiiiiiz Před 5 měsíci

    Thank you for the great topic

  • @pucbaldwin
    @pucbaldwin Před 4 měsíci

    Thanks very useful video

    • @ResinChemTech
      @ResinChemTech  Před 4 měsíci

      You are welcome. While the use of YAML isn't near as common as it was in the past, it is still a good idea to have a basic understanding and an organizational structure in place when the time comes that you do need to use YAML to do something in Home Assistant.
      Thanks for watching and the comment!

  • @alfankosh1
    @alfankosh1 Před 5 měsíci +1

    first like

  • @DamienDavidO
    @DamienDavidO Před měsícem

    at 16:32 you mention using a unique identifier but when i go to do this my check configuration states "Invalid config for 'panel_custom' at configuration.yaml, line 21: 'intergration_custom' is an invalid option for 'panel_custom', check: panel_custom->0->intergration_custom
    "
    is there something i have to download to get this to work?

    • @ResinChemTech
      @ResinChemTech  Před měsícem

      You should not need to download anything just to get a split configuration working. However, what is 'panel_custom'? Have you already split out some of your YAML to split files? If so, it is likely one of these files that is causing the configuration check error when you include them in the main configuration.yaml via the split option. The configuration check passes when you don't have the split statement because these other YAML files would not be included. Check your YAML and see if you can find somewhere that a custom_panel is defined. It is likely the error is resulting from including that YAML.

    • @DamienDavidO
      @DamienDavidO Před měsícem

      yeah no luck at all for me.

  • @TheLukemcdaniel
    @TheLukemcdaniel Před 5 měsíci

    Much like my spurn for python, yaml gets my ire by using white space in syntax.
    WHITESPACE IS FOR READABILITY NOT SYNTAX
    This is an unforgivable sin.