I get this warning in the log
Integration: Template (documentation, issues)
First occurred: 4:43:12 PM (1 occurrences)
Last logged: 4:43:12 PM
The ‘entity_id’ option near /config/configuration.yaml:82 is deprecated, please remove it from your configuration
and mi code is this one
I tried the excluded line but the sensor didn’t work
How can I fix it to avoid the warning in the log
I believe you want to remove what appears to be line 84 in your YAML file.
Comment it out with a ‘#’ sign, first. Then if it works, remove it.
You may still need the value later, for something else.
I know but I defined that sensor to publish an attribute and I use it.
So maybe I am exposing this attribute with an old methodology and there is a new way to do it that I don’t know.
Did you recently upgrade from a very old version of Home Assistant?
entity_id option was eliminated from Template Sensors over a year ago:
I’m not sure why it wouldn’t if you only eliminated the “entity_id:” line.
everything else looks OK.
the only thing that “entity_id:” did was to give something for the sensor to update on since it wasn’t smart enough at that time to extract entities from the template.
It is now so that’s why it was removed and deprecated.
Sorry I didn’t understood you the first time, now it works
You should mark FredTheFrog’s post with the Solution tag (not mine) because it was the first to identify the problem and how to fix it.