I don’t know whether it’s better to post here or to submit an issue to github, but I’m puzzling over how to use the new condition template syntax in scripts and actions. The docs say this:
The template condition has a shorthand notation that can be used to make your scripts and automations shorter.
It works fine in the condition: block of an automation, and I can use it in the choose: block in a script/action, but I was hoping that it would also be usable in ‘inline’ conditions in scripts/actions such as this:
It’s effectively the same syntax that one would use in the other two cases, but I can’t work out what syntax, if any, should be used here. I was hoping for something like this, as can be used elsewhere:
- "{{ trigger.event.data.control == 'DOF' }}"
but not that nor any variant passes the config check. Is choose: the only place in a script or action where the new syntax can be used?
Sure, hoping they’ll chime in here. If it’s intended to shorten/simplify scripts, adding a choose: or a dummy ‘condition: or’ or ‘condition: and’ with a single condition doesn’t really help
Frenck found a solution for the shorthand in an action/script, but he and Paulus didn’t like it and decided to pull support for the shorthand notation outside of repeat/while/until, condition blocks in automations, and (probably?) and/or blocks. He’s going to make it clear in the docs what’s supported.