-
-
Notifications
You must be signed in to change notification settings - Fork 28.6k
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
Trigger templates are executed twice since 2023.9.1 #100096
Comments
as noticed in the heads-up Persistent notifications thread https://community.home-assistant.io/t/heads-up-2023-6-longer-has-persistent-notifications-in-states-what-to-do/578654/138?u=mariusthvdb the nested list attributes suffer, but indeed also regular trigger templates. my example for that topic in the community:
and a nested attributes version of that, on the same trigger:
|
I can reproduce the problem on 2023.9, but not on 2023.8. The root cause is a regression introduced by #97400 |
The problem
I have a helper trigger template sensor (as backup for a Riemann sum)
This takes the delta of each change of source and adds it to the counter. The source is resetted after each loading session.
This works with <= 2023.8.x
source added
counter added
But now with 2023.9.1 it adds 2x the values:
Compared the values in more detail. from and to in an automation are correct. Delta is always 180Wh each minute in the source.
Chart of the source is showing this as well.
But the template sensor adds as shown now 360Wh per minute.
I cannot check if it is now called whyever twice in each trigger or uses other tigger or is using wrong from or to, e.g. from from one trigger before, …
Sees to be related to #99972 or https://community.home-assistant.io/t/new-behavior-self-referencing-template-is-evaluated-twice/612296 There it is not sum but lists and attributes but the bassis seem to be that always the trigger triggers twice.
In my example it corrupts now the values and the follow up values (daily, weekly, ...) as well as the home energy, etc. For me a serious/severe bug.
What version of Home Assistant Core has the issue?
2023.9.1
What was the last working version of Home Assistant Core?
2023.8.x
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
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: