-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Template sensors not working since 2025.03.2 #140447
Comments
Hey there @Petro31, @PhracturedBlue, @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) template documentation |
Hi this is not a bug, you have issues in your templates. Your first error is telling you that
|
Thanks @Petro31 I probably should not have included that error log as I think it can cause confusion here. Let's ignore that one for now and concentrate on my second example. This one is pretty simple. It grabs the value of a stats sensor and of a temperature sensor and figures out the best value to return. In the example from the dev tools template tester, the template should be outputting 78.7, but since installing 2025.03.2 it isn't working: ![]() The last data point here is when I installed the update last night. |
I'd like to clarify that nothing in templates was changed between these 2 versions. Your issue is likely elsewhere. Otherwise, please provide the following:
|
@Petro31 Yeah, I noticed that too. I'm not sure what could be causing it though. When you say "A template entity and it's configuration that does not error.", you want me to provide some other template entity/configuration? Because the one mentioned in my second post ( Right now I have a bunch of sensors failing, but many of them have a root cause of the The template for Just to provide the info mentioned for this template: Template:
So this template uses just 2 other sensors:
![]() ![]() At the bottom here is the template sensor. And for good measure, I copied/pasted the entire template into dev tools and it returns a valid value. ![]() |
I notice your template has a unit of measurement of degree F but you don't have device_class temperature on it. Are you sure you don't have errors in your logs? This technically isn't a valid configuration because of that. |
I'm sorry, I expected an error here to be reported often (at each restart at a minimum, but maybe even each time one of the constituent sensors was updated). So I went back further in the log and found an error logged last night, but none since then (even though I have restarted HA a few times since then). This seems to have been logged right after the update installed, but before HA restarted, but never again since then.
I just updated the template to add the device_class, just to be sure that wasn't causing a problem (this sensor has been active for at least idk, 8-12 months without it though):
I did a full restart, but the template sensor is still reporting "unknown" as the state. But in dev tools it reports "53.3" and the result type is "number". |
I'm not sure what to tell you. Please review your configuration and logs please. I suggest you add |
The problem
I'm seeing that a few of my template/history sensors are not working after moving from 2025.03.1 to 2025.03.2.
This is one example.
What version of Home Assistant Core has the issue?
2025.3.2
What was the last working version of Home Assistant Core?
2025.3.1
What type of installation are you running?
Home Assistant OS
Integration causing the issue
template
Link to integration documentation on our website
https://www.home-assistant.io/integrations/template/
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
I debugged using the dev tools template editor using:
This reported:
The text was updated successfully, but these errors were encountered: