I have just upgraded to 2021.4.1 and found the trigger based template sensors very useful (Awesome work by the way). It will allow me to get rid of a custom component I’ve been using.
Only problem is that the configuration only seem to work in the configuration.yaml file and not in sub configuration Package files.
I get the following error when placing the config in a Package file: Package ... setup failed. Component template cannot be merged. Expected a dict.
I have tried to place it under homeassistant: the way customization work in Packages but then it doesn’t give me an error but also doesn’t work.
Any Idea on how to configure Trigger Template Sensors in a Package?
Maybe you can add to the issue? Seems unforeseen the packages wouldn’t work, but as I have just discovered adding all sensors to the configuration.yaml makes the config check ok.
Hope this gets fixed any time soon. Never have had such a huge configuration.yaml
I’ve got the same issue, can’t switch to the new template syntax as my code is all split into packages.
Can’t wait for it to be supported within packages.
I hadn’t had the time to explore this new feature, yet, but could someone be so nice and explain this a liitle more to me?
You try to use
template:
- trigger:
...
in a package file, let’s say light_package.yaml and this doesn’t work. If you put the same in configuration.yaml or in an included file, like @Mariusthvdb posted, it is working?
Did anybody try to use it by putting template: into configuration.yaml and just use it again in the package file? Did that work?