Hi, I got my script working, but I would like to understand why I need to use the states() function (and not just 'state() ) in my template condition to make it work. the passed variable is the entity name of a input number (helper entity).
google or chat-gpt could not provide me with a correct or understandable answer.
The short answer is that the function’s name is states not state.
I don’t really know enough to be certain, but I think the template function/filter was named states() to avoid conflict/confusion with a backend state() function used to set state properties.