[ANSWERED] Split configuration (Style 2 - where each device is listed separately)

Hello All.

All devices in my config are defined as a separate logical device, for example:

sensor asus_mini_temperature:    
    name: "Asus Mini Temperature"
    platform: mqtt
    device_class: temperature
    state_topic: "devices/asusmini/temp"
    unit_of_measurement: "C"

sensor asus_mini_free_space:    
    name: "Asus Mini Free Space"
    platform: mqtt
    state_topic: "devices/asusmini/space"
    
sensor orange_pi_zero_temperature:    
    name: "Orange Pi Zero Temperature"
    platform: mqtt
    device_class: temperature
    state_topic: "devices/orangepizero/temp"
    unit_of_measurement: "C"

I want to split configuration file into few separate one’s, so my config.yaml would contain few !include references for this files:

configuration.yaml:

!include servers.yaml
!include printer.yaml
!include sonoff.yaml

Each of the files can include Sensors, switches, different type of plugins.

Is there a way on how to do it without moving all items under one category ? I just want root file to include roots of other config files.

I am guessing you would like packages.

2 Likes

Yes, that’s what i was looking for. Thank you!

1 Like