#Automation 'if' execution errors if blank line in Value Template

1 messages · Page 1 of 1 (latest)

fervent raptor
#

As at 2025.11.2, when editing an Automation 'if' statement, especially on mobile, it is very easy to enter a blank like (carriage return) in the Value Template.
The automation will save without errors but then fail to run when executed with a slightly obtuse message.
I think this should be raised as an issue on github but not sure wheter to raise in 'core' or 'frontend'?

devout forge
#

You cannot do the weather.home and expect to be number. It stores values like sunny, cloudy, rainy...

Edit: As TheFes said, you look at attributes, I completely missed this one.

#

There must be another entity that holds the temperature, I guess sensor.home_temperature or something similar. I use the OpenWeatherMap and in my case entity is sensor.openweathermap_temperature

subtle remnant
subtle remnant
fervent raptor
#

Yes, the field was probably always there, but when changing the threshold temperature a couple of days ago, I accidentally placed a blank line in the Value Template field - quite easy to do on mobile and not easy to see as the input field just looks blank. When saving, the field should perhaps be right stripped.

#

The message is not really clear as it references the 'numeric_state', not the template but when I saw the |+ in the YAML, it didn't look right. That kind of error might be a lot harder to track down for a new user - and it's very easy to trigger it!

subtle remnant
#

Yeah, but that's not new in 2025.12 then. I suppose this could have happened on earlier versions as well.
You could create a FR to ignore the value_template if there is no template in it. I don't think it's an issue

fervent raptor
#

No, not new - which is why I said 'As at' rather than 'Since'. It is definitely an issue - an effectively blank field should not trigger an error on execution if the save has been successful. The question is whether it is a 'frontend' or 'core' issue.

subtle remnant
#

it's frontend

#

and I doubt the team will take it up as an issue, but feel free to create it 🙂

fervent raptor
#

Thank you. I hope they do as it's an 'easy win' (famous last words!) and will help prevent scaring off new users.