One of my integrations (Meteo France), generates Entity names which begin with numbers. For instance: sensor.78_weather_alert.
This seems to cause problems with templating.
I have solved this problem by changing the entity ID to sensor.weather_alert_78. There are helpful instructions for this here: Customizing entities - Home Assistant
Hopefully this will help someone in the future who happens to have an entity name starting with digits.
(Please make suggestions for keywords to add here to help this become findable!)