The documentation doesn’t show the state_class
option for legacy Template Sensor. My understanding is that the energy integration includes entities containing that option (and set to measurement
). Without that option, the entity is excluded.
Easy way to find out is to convert one or more of your Template Sensors from legacy to the new format and add state_class: measurement
.