I’m struggeling with some automation code and do not know how to fix it. Can anyone of you give me a quick hint?
I was creating an automation with a code part and got message, that value should be a string.
I’m counting more opening braces then I do closing ones. Also, the domain (sensor, input_number, …) is missing in the above.
Something that may or may not be wrong (because it is below a multiline indicator), but is at least confusing: a minus at the start of a line has a meaning in yaml, so personally I’d avoid that in a template like this.
It is always best to test the template in the developer tools. Build it step by step if a big one fails.