Curly braces in templates #1117
Unanswered
bux
asked this question in
Questions about config, custom styles and templates
Replies: 1 comment 2 replies
-
The code you provided works for me;
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Goal
I would like to use the Intl.DateTimeFormat function inside a style template.
I'm pretty new to home assistant, bubble card and templates in general.
How does one escape curly braces inside the javascript literal?
Source Yaml
Which step did you already try?
{{ }}
\{ \}
Problem
The options object that needs to be passed to the DateTimeFormat constructor has curly braces. Those need to be escaped for to be able to save the yaml.
Read the documentation
Beta Was this translation helpful? Give feedback.
All reactions