I would appreciate any help with the template yaml below. The entity sensor.mySensor correctly appears on a dashboard but the condition block has no effect on the sensor output which updates whenever the trigger fires (every 30s here)
Any thoughts on what I am doing wrong?
The Jinja2 template editor shows the same behaviour: the output still updates even though the condition evaluates as ‘False’
The functionality to include conditions with triggers has recently been added to template sensors in Home Assistant. Has anyone else experienced problems with making the new functionality work correctly?
My version: Core
2025.3.3
Supervisor
2025.03.2
Operating System
14.2
before we start - go reformat your code in your post - embed it inside preformat (three back-ticks) or use the preformatted text block under the gear in the editor.
I agree with NathanCu that it would be preferable for you to post your YAML as formatted code. It’s challenging for us to examine what you posted and confirm all of its syntax and indentation is correct. Refer to the linked guide in NathanCu’s post.