Hi everyone, need some assistance with migrating from the original MQTT->binary_sensor setup to the new format.
I have arranged my configuration.yaml like @frenck has, with pointers to directories and files which contain the actual definitions of the automations and sensors.
So my setup in my configuration.yaml looks like this:
switch: !include_dir_list switches/
sensor: !include_dir_list sensors/
binary_sensor: !include_dir_list binary_sensors/
input_number: !include_dir_named input_number/
input_boolean: !include_dir_named input_boolean/
input_datetime: !include_dir_named input_datetime/
In case of my binary_sensor files, I put those in the /binary_sensors directory.
So in this directory there are dozens of files like this example named triple_01_links.yaml
---
platform: mqtt
name: 'triple_01_links'
state_topic: 'home/triple_links_01' #'home/[name] comes from python-script file
off_delay: .2
I struggled ages to get the indentation right, so now I’m with my hands in my hair on how to migrate all these files to the new format.
My question is: how do I make a similar nested structure to organize my binary_sensors according to the new formatting?
probably with a line in my configuration.yaml like this:
mqtt: !include_dir_list mqtt/
and add migrated .yaml files to this /mqtt directory.
But I struggle a lot with indentation and formatting these files. Tried several options, but keep getting errors when I check my config-validation.
If anyone has the correct migration from the above triple_01_links.yaml file to the new convention, I probably can do the others myself. Just need a first example.
Any help much appreciated!