Error: expected <block end>, but found '<scalar>'

So what am I doing wrong here?


    - name: template_count
      unique_id: 019b2cf3-4ceb-6acfeab0a274
      state: "{{ integration_entities("template") | count }}"
      attributes:
        friendly_name: "Tmp"

The system cannot reload because the configuration is not valid: Error loading /config/configuration.yaml: while parsing a block mapping in "/config/./templates/sensor/HA_s-tmpl.yaml", line 70, column 7 expected <block end>, but found '<scalar>' in "/config/./templates/sensor/HA_s-tmpl.yaml", line 72, column 40

In developer template I get a count from the template string.
The basic templates sensor works with


    - name: zones_count
      unique_id: 890ea1a7-0210-9108a4cc66e2
      state: '{{ states.zone | count }}'
      attributes:
        friendly_name: "Zone"

single quotes inside double quotes or vice versa.

1 Like

I’m blind. Fought with that forever…

You are mentally blind.
You read what you expect to read, not what the text actually says.
This is especially true if you also wrote the text yourself.

Take a break where you mind gets occupied with something else, so you can not remember the details of the former project and then return.

This template came up months ago related to something else somewhere else. I tried then, and a month later, and now with the same blinders on missed it every time. So yes…

If I was looking at someone else’s code it would have stuck out like a sore thumb. It happens, that’s why I asked here. And now that error code is here in the search for Petro to help someone else with the same answer.

I was just trying to say you are human after all. :smiley:

I reject your reality and have substituted my own!

Na, I’m not upset about anything, Just was a pretty big duh for the number of times I looked at that thing.

What reality do you have then?
You have rejected mine and you have substituted your own, but with what? :smiley:

Mentally blind or hallucinating again and saw a “with” in that line? :rofl:

1 Like

Aaaa, yes, that is the real question.