That’s a legacy format template sensor: you should use modern format instead.
Legacy should still work though, and even if the template doesn’t return what you want, the entity should at least show up — where have you put that sensor configuration, and have you restarted HA? Are there any errors in the logs?
thanks for the replies,
I don’t understand why but, I did a restart home assistant and the sensor appeared, and clearly there are no errors in the log.
Since it was implemented I do the quick reload if I have changes to a file and I’ve never agreed that it didn’t load everything.
I have everything saved in the packages folder and each project has its own sensors, I also keep them divided to help me if I have changes.
another question
Honestly, I have all my sensors with the old format.
does it make sense that I update them all to the modern format?
At the moment, it doesn’t matter — legacy format is supported. I did convert all of mine and write all new ones in modern format, but for now, there is no practical reason to do so other than keeping up to date with recommended practices.
I was looking at the new template creation method and indeed it’s leaner to write, although for others like light , switch, it’s slightly different and sure I’d be wrong to compile
I know I’m wrong not to stay up to date with the changes that developers make, but lately I don’t do a lot of things other than the occasional addition that I need, or if some configuration gets deprecated.
thanks again for your replies