-
Notifications
You must be signed in to change notification settings - Fork 255
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
nested template in variables confusion in 4.1.0. dev.1 #743
Comments
That doesn't work because you make Also this is unrelated to the PR you mention. |
yes, confirm this works:
nice. btw is it expected there is an error when using
while:
works, and
does not require the brackets? even when not using the variable but the original
we can leave out the brackets no issue, I tend to always put brackets around those if's, only asking for 100% security btw some renaming does make it feel less 'hacky'
|
|
a yes, ofc, its the closing as no issue |
Checklist
Describe the bug
A clear and concise description of what the bug is.
not this is a bug, or a user misconception of the new feature introduces in 410 dev-1 (pull #741)
have a nested variable ( binary == 'on') with a card external entity used as state inside the second throws no error, but doesnt do anything either.
Not sure if the 'evaluate once' of this new feature is referring to the loading of the card config, or, as it seems now, also pertains to the actual entity being evaluated or not after loading of the card.
Version of the card
Version:
To Reproduce
This is the configuration I used:
original working config, without secondary variable (but repeated entity in the config templates on several spots)
added the binary == 'on' as a second variable, and used it inside the action_color variable. This no longer updates that color variable. It does work correctly for the animation and changing the icon:
Screenshots
If applicable, add screenshots to help explain your problem.
working state without wiggle
with second variable
ofc we can use both the color and the wiggle ;-)
but this requires to verbosely repeat the condition on all places, which was the reason to try the new variable option:
Expected behavior
A clear and concise description of what you expected to happen.
Nothing 'expected' here, merely hoping this would be possible, so please close if this cant be done after all.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Working alternative: use the same binary in both variable declarations:
saves some code repetition in the button config. This however might be the purest illustration of what I was hoping to do.
The text was updated successfully, but these errors were encountered: