I have been reading the official pages on the forums and addons, but still I am not feeling all confident when tinkering around in the configuration. Any of you superusers that can spare a moment or two to explain me the structure of he file buildup?
For example when it comes to sensors. As I build my file, more and more sensors will be added to the file, do I just list them like this:
sensor:
- platform: yr
- platform: ring
- platform: plex
- platform: qbittorrent
qbittorrent:
url: !secret qbtlink
username: !secret qbn
password: !secret qbp
- platform: systemmonitor
resources:
- type: memory_free
- type: memory_use_percent
- type: disk_use_percent
arg: /home
- type: processor_use
- type: last_boot
- type: ipv4_address
arg: eth0
- type: network_in
arg: eth0
- type: network_out
arg: eth0
or can i have segments in it? … for example
# Ring sensor
sensor:
- ring
# Ring Component
ring:
username: !secret rusn
password: !secret rpsw
and then add another sensor in another segment like
I like the packages approach.
Every different thing got his own file or folder. Downside, not possible to reload automations scripts and so on.
But do as you please
I personally prefer to keep my config pieces in individual files in separate folders like this one for the input_boolean for example:
I was thinking about using packages until I figured out that making changes in the automation part of a package still requires an HA restart rather than just reloading the automations from the UI when I have the automations in my automations sub-folder.
If I want to split my huge automation.yaml file up into areas based on this schema: config/domain/area.yaml (e.g. config/automation/lounge.yaml, config/automation/kitchen.yaml etc…) am I correct in assuming that I have to use
automation: !include_dir_merge_list automation/
What about if my directory structure was based on this schema: config/area/domain.yaml (e.g. config/kitchen/automations.yaml, config/lounge/automations.yaml, ) how would I include those files?
I’m not sure which schema I’ll go with yet. Any advantage to either of the above?
The advantage of the first solution is that it will work
Just as you wrote the reference to the automation locations you can then easily either add a single file for each area or even a sub-folders for each area with an individual file for each one of the automations.
The second approach would require the ability to reference to multiple files or folders with the !include from the configuration.yaml, which is not possible as far as I understand it.