I’ve spent days trying to figure this out. I have a set of template sensors that are conceptually related, and are included using template: !include templates.yaml. This includes a mix of binary_sensors and sensors.
There’s another set of template sensors that are not conceptually related, and I want to split their definitions into a separate file. These are only sensors.
From what I can understand from the article on splitting the configuration, this can be done with labels, something like this:
However, I am not able to find the sensors from other_templates.yaml - the ones in templates.yaml show up and work the way they should. If I copy the definitions from other_templates.yaml into templates.yaml it works fine.
Did you make sure to restart HA? Neither reloading templates alone or a full YAML reload from the Dev Tools will not load new files.
FWIW, packages are so much easier than messing with all those !include tags and labels:
In addition to easy, they are very flexible allowing you to organize the configurations to your preference. If you want a file to just contain the template binary sensors of one room, you can do that. If you want one file to contain configurations from multiple integrations because they function together, you can do that too.
Thanks, packages seem to be the best solution. Still not sure why the labels didn’t seem to work - I could have sworn I’d tried restarting, but after days of trying, I can no longer say for sure what’s been tried.
You didn’t, true. Didgeridrew certainly did seem to. The feature seems to do exactly what I want (group conceptually related configuration) in exactly the way I want it to, so I’m not sure why it wouldn’t be relevant.