I realized this sounds super strange, and I’m scracthing my head for 2 days and couldn’t figure out, so I write here and hope you can help me on this.
I use some template sensors to filter out invalid values. After upgrading to 2026.02, 2 of them suddenly stops working. It show “unavailable” and when I click on the entity I got the error message “This entity is no longer being provided by the template integration. If the entity is no longer in use, delete it in settings.”
I have seen such error before and usually I can delete the sensor from GUI and restore by reloading the template.ymal. But this time it didn’t work. My sensor looks like below:
The below warning I find in the log could be the root cause, but I have no idea how to fix the template, and for whatever reason it works fine for all other “filter” templates:
ValueError: Sensor sensor.toolshed_weather_temperature has device class 'temperature', state class 'measurement' unit '°C' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'unknown' (<class 'str'>)
After many times restart and reload, I managed to restore 1 of the sensor by manually setting the RAW value, however for temperature sensor above I couldn’t make it work.
Has there been some changes to HA 2026.02 that could potentially cause the issue? Those sensors worked for more than half a year w/o issue.
Appreciate any suggestion!
Is it related to this? Upgraded from what version?
Also Templates are testing if they are actually functional in more cases now. This may have been broken but it is only now telling you. Deprecation of legacy template entities in 2025.12
Thanks for your reply! I don’t believe so as it’s the new syntax - I have done migration for template fan before and in this case I didn’t receive any warning.
My guess is the template sensor has introduced some strict validation, so now I can no longer create a number sensor when the initial state is unknown. This must be something newly added to recent version(s) of HA.
Maybe @petro can help?
Ok maybe a catch 22 situation - I’d like to get the old value of itself if the change of the raw sensor has out of boundary value. Strangely it works fine for the humidity:
Hi ok thanks a lot for the help! Will give a try and report back.
I hope there is an easier way to do filtering of invalid values, I realized my way of using trigger template is not very robust in such situation
If this sensor was manually converted from old style, you may have missed setting the default entity id. Based on the name above, the entity id would be sensor.toolshed_temperature and not sensor.toolshed_weather_temperature. If I’m right you can fix the entity id in the UI.
I think you can use the this variable to make sure you use the right entity. It won’t protect you from non umerical values though.
Hi, that’s a good point! However my issue is that I can’t even add the template senor, it shows up in developer tool, but under entity list it’s unavailable so I can’t rename it but only remove it.
I assume the template in the newer version has more strict validation (which is good), and my approach of doing filtering with a template need to be re-visited, it’s like a workaround and maybe it’s time to find a better solution to filter invalid values.
If you did convert from old style to new, you could be looking at a restored entity while the new one has the new name. Make sure to check that entity id too. Plus the sensor will not populate until the raw sensor updates.