I’ new with Home Assistant. After much trial and error I was able to use waste collection schedule".
I tried to put this in another file and user !include. But If I do:
sensor: !include … : I get an YAML error: duplicate mapping key . How to avoid this? Or can I ignore it?
Also: where to put the integration? (e.g. the entries before sensor: )
If you have sensor: !include.... in your configuration.yaml, you must move all sensors out into the included file(s). You cannot have an additional sensor: block also in the configuration.yaml file, which is what the error is telling you: duplicate mapping key.
I tride to move the sensor: part in another file and use sensors: !include …, but then all the sensors disappeared im Home assistant. Also the calendar disappeared. SoI belive hat the “platform” (e.g. the entries between “waste collection schedule” and the sensors: where not found anymore. Where to put this?
I have automations spread across many folders and files under the automations/ folder, same for rest, sensor and template.
At the moment, I don’t have enough content under the other domains to need more than one file, so my (non-template) binary sensors, for example, are in a single file in the same folder as configuration.yaml. If this file grows larger than I want it to, I will split it out in a similar way.
I use yamls/sensor/ just for organisation. yamls/ is the folder where all my .yaml files are are stored in subfolders like sensor/ where all my files from the sensor integration are.
I think the differences are very well explained at the link I posted.
It’s all about how the files are combined. For example !include_dir_list ignores the filename and can only contain one entry where !include_dir_named uses the file name as the indented configuration option and can contain only one entry too.