Skip to content

Packages

Max Chodorowski edited this page Jan 25, 2021 · 1 revision

Packages are very useful to bundle all (almost all) sort of confuguration in one place. This is useful for example if you have some sensors and related to them automation, customizations etc. Thanks to packages you can have all of that in one place/file.

I'm not going to duplicate the HA docs where everything is written in a simple way so here is the link.

This is how it is configured on my HA:

  • configuration.yaml

    homeassistant:
      packages: !include_dir_named configuration/packages

    This will process all the files in the configuration/packages and create from them dictionary file_name => file_content.

    I can now add for example all sensor definitions/configuration and related to them automations in one single file.

  • package_name.yaml

    homeassistant:
      customize:
        # your customizations
    input_boolean:
      # your input sensors
    binary_sensor:
      # your binary sensors
    automation:
      # your automation

Packages in my config repo: https://github.com/maxwroc/homeassistant/tree/master/configuration/packages

Clone this wiki locally