"modern" style template sensor confusion

Please read the deprecation notice and check that you have not committed one of the common errors listed in the top post:

Your error:

The instructions in the repair say to put the new configuration in configuration.yaml, not sensors.yaml. That file is most likely included under the sensor integration, not the template integration. The current syntax needs to be under the template integration.