New template not creating the entity as I want

Hi there,

I went through the process of creating a new entity through templates.

I have called the templates.yaml from the configuration.yaml :

Then created and save my templates.yaml :

And as you can see in there, I wanted to create 2 entities …

Saved the file, reloaded the template.yaml and even afterwards the complete yaml config, but still entities are not showned in the developper tools when I look for them :

… Nor in Parameters / devices and services :

Do you see what I have done wrong here ?
Many thanks !!

Any related error messages in the Log?

No, nothing …

Have you restarted since adding the templates.yaml file? Restarting will pull in the first instance of an integration, reloading does not.

Done - just restarted the whole HA and it is ok now !
At least I have described a procedure how to use the templates lol

thank you !

Are these two Template Sensors the first Template entities you have ever configured in your system or did you already have other ones that you configured previously?

The reason why I ask is because this appears in the Reload list only after the first Template entities have been created after a restart.
Screenshot_20240118-121453~2

When it appears in the Reload list, it allows you to load all additional Template configurations without requiring a restart.

So when you said you reloaded templates.yaml, what exactly did you do to make that happen? Because if you clicked Reload Template Entities, that should have worked (because that’s the whole point of that command).

To recap, it’s only necessary to restart Home Assistant if it’s the first time you create a Template entity (in YAML). Afterwards, the Reload Template Entities command will reload existing Template entities and load new ones (i.e. a full restart isn’t required).

It was the first time (and you are right before I didn’t had this option to reload the templates in the “Development tools → YAML”, … and I have this option appearing now, BUT I did a reload in the “Studio Code Server” by hitting CTRL + SHIFT + P then selecting reload template

I assume you now understand that commnd in VS Code has absolutely nothing to do with reloading anything in Home Assistant.

For future reference, it was this statement that was clear to you but misleading to others.

I assumed you reloaded Template Entities in Home Assistant (and even reloaded the entire configuration file in Home Assistant). The clue that you might not have actually done that was because it seemed to me that these were your first Template entities and so the Reload Template Entities command wouldn’t be displayed (thereby requiring a restart or reloading the configuration file in Home Assistant).