Including directory goes wrong - all the time

Hi guys. Need your help.
I’m building a new HA-instance for family. Already have some experience but don’t know what I’m doing wrong :blush:. Verification of config goes without any problems (Valid!), but the files aren’t including.

Configuration.yaml

automation: !include_dir_merge_named conf/automation/
cloud: !include_dir_merge_named conf/cloud/
group: !include_dir_merge_named conf/group/
script: !include_dir_merge_named conf/script/
switch: !include_dir_merge_named conf/switch/
recorder: !include conf/recorder/recorder.yaml
sensor: !include_dir_merge_named conf/sensor/

Files in: conf/sensor/ : sys.yaml and battery.yaml

Battery.yaml

  - platform: template
    sensors:
        neo_woonkamer_pirsensor_battery:
            friendly_name: "Woonkamer PIR batterij"
            unit_of_measurement: '%'
            value_template: '{% if states.zwave.neo_woonkamer_pirsensor %} {{ states.zwave.neo_woonkamer_pirsensor.attributes.battery_level }} {% else %} Unkown {% endif %}'
        neo_voordeur_deursensor_battery:
            friendly_name: "Voordeurdeursensor batterij"
            unit_of_measurement: '%'
            value_template: '{% if states.zwave.neo_voordeur_deursensor %} {{ states.zwave.neo_voordeur_deursensor.attributes.battery_level }} {% else %} Unkown {% endif %}'
        neo_skgm_raamsensor_battery:
            friendly_name: "Slaapkamer GM raamsensor batterij"
            unit_of_measurement: '%'
            value_template: '{% if states.zwave.neo_skgm_raamsensor %} {{ states.zwave.neo_skgm_raamsensor.attributes.battery_level }} {% else %} Unkown {% endif %}'
        neo_schuur_deursensor_battery:
            friendly_name: "Schuurdeursensor batterij"
            unit_of_measurement: '%'
            value_template: '{% if states.zwave.neo_schuur_deursensor %} {{ states.zwave.neo_schuur_deursensor.battery_level }} {% else %} Unkown {% endif %}'
        neo_keuken_pirsensor_battery:
            friendly_name: "Keuken PIR batterij"
            unit_of_measurement: '%'
            value_template: '{% if states.zwave.neo_keuken_pirsensor %} {{ states.zwave.neo_keuken_pirsensor.battery_level }} {% else %} Unkown {% endif %}'
        neo_keuken_deursensor_battery:
            friendly_name: "Keukendeursensor batterij"
            unit_of_measurement: '%'
            value_template: '{% if states.zwave.neo_keuken_deursensor %} {{ states.zwave.neo_keuken_deursensor.battery_level }} {% else %} Unkown {% endif %}'
        neo_hal_siren_alarm_battery:
            friendly_name: "Alarmsirene batterij"
            unit_of_measurement: '%'
            value_template: '{% if states.zwave.neo_hal_siren_alarm %} {{ states.zwave.neo_hal_siren_alarm.battery_level }} {% else %} Unkown {% endif %}'
        neo_hal_pirsensor_battery:
            friendly_name: "Hal PIR batterij"
            unit_of_measurement: '%'
            value_template: '{% if states.zwave.neo_hal_pirsensor %} {{ states.zwave.neo_hal_pirsensor.battery_level }} {% else %} Unkown {% endif %}'
        neo_garage_deursensor_battery:
            friendly_name: "Garagedeursensor batterij"
            unit_of_measurement: '%'
            value_template: '{% if states.zwave.neo_garage_deursensor %} {{ states.zwave.neo_garage_deursensor.battery_level }} {% else %} Unkown {% endif %}' 

Sys.yaml

 - platform: yr
 - platform: dsmr
   port: /dev/ttyUSB0
   dsmr_version: 5   

What am I doing wrong?

Same problem with automation. There’s one file in the directory called ‘sys_backup.yaml’:

  • id: bck_aanmakenbackup
    alias: BCK - Aanmaken back-up
    trigger:
    • at: 05:00
      platform: time
      condition:
      action:
    • service: hassio.snapshot_full
      data_template:
      name: Automated Backup {{ now().strftime(‘%Y-%m-%d’) }}
  • id: bck_uploadbackup
    alias: BCK - Upload naar Dropbox
    trigger:
    • at: 06:00
      platform: time
      condition:
      action:
    • data:
      addon: 7be23ff5_dropbox_sync
      input:
      command: upload
      service: hassio.addon_stdin

try and remove your initial indentations in your files.
For example instead of

  - platform: template
    sensors:
        neo_woonkamer_pirsensor_battery:

try:

- platform: template
  sensors:
      neo_woonkamer_pirsensor_battery:

I think your directory paths may be wrong. For automation: !include_dir_merge_named conf/automation/ is the directory really conf/conf.automation? The configuration.yaml assumes paths relative to where it is located.

The file is:

conf/automation/sys_backup.yaml

the others:

conf/sensor/battery.yaml
conf/sensor/sys.yaml

Doesn’t change a thing.
I am receiving errors (validation of config) when doing something bogus

So, if you are in the directory that contains your configuration.yaml, there is a conf directory with a sensor directory in it.
Just verifying because incorrect paths would stop the files from being included.

Correct:

/
conf
conf/automation
conf/sensor
configuration.yaml

if I do

automation: !include conf/automation/sys_backup.yaml

Nothing’s wrong, it works.

this is what I have for mine and it all works…

### INCLUDES 
homekit: !include homekit.yaml
input_boolean: !include inputboolean.yaml
input_select: !include inputselect.yaml
ios: !include ios.yaml
notify: !include notify.yaml
sensor: !include sensors.yaml
binary_sensor: !include binarysensors.yaml
switch: !include switches.yaml
group: !include groups.yaml
automation: !include_dir_merge_list automations/
script: !include_dir_merge_named scripts/
zone: !include zones.yaml
shell_command: !include shellcommands.yaml
#alert: !include alerts.yaml

the files that are directly in my config folder just contain the !include - the files that are in a sub-directory use !include_dir_merge_named
I don’t know where I found to use the “list” merge for automations but it works, but I had to move my main automations.yaml inside the automation directory

if your “conf” directory is actually your main HA config dir than you probably don’t need to put that in the path…