Skip to content

Validation template

Compare
Choose a tag to compare
@amitfin amitfin released this 17 Dec 20:16
· 103 commits to main since this release

validation is a new optional parameter for providing a template with a boolean expression. Note that it uses a special format with square brackets "[[ ... ]]" instead of curly bracket "{{ ... }}". This is needed to avoid rendering the expression in advance. (I'll be happy to hear a better idea.) entity_id is provided as a variable. For example:

validation: "[[ state_attr(entity_id, 'brightness') == 70 ]]"

Full changelog: v2.5.0...v2.6.0