Skip to content
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

Condition state takes template literally #117265

Open
LarsWigger opened this issue May 11, 2024 · 0 comments
Open

Condition state takes template literally #117265

LarsWigger opened this issue May 11, 2024 · 0 comments

Comments

@LarsWigger
Copy link

The problem

Hello,
I am trying to unify some automations using a script. The script is meant to check whether the value stored in an input field matches the field/parameter passed to it by the automation. Here is the code:

- condition: state
            entity_id: input_text.schalterszene
            state: "{{ scene }}"

To my surprise, "{{ scene }}" is not substituted with the value of the field, but taken as a literal value. I can validate this by manually setting the value of the field to "{{ scene }}" and seeing that this causes the condition to evaluate to true.
scene is defined in the script, in successfully uses it at another location.
This seems like a bug to me. If it is not, I did not see this mentioned in the documentation.

What version of Home Assistant Core has the issue?

core-2024.5.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

Link to integration documentation on our website

No response

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

@LarsWigger LarsWigger changed the title Condition state does takes template literally Condition state takes template literally May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant