Please, pointer to good syntax discussion - config-template-card

I’ve been a programmer essentially all my life and I confess to complete confusion…

Can someone point me to a good description of how template syntax works, specifically with regard to something like config-template-card.

I found the Jinja2 pointer. I’ve read the HA templating section. Neither one seems to discussion structures related to ${x} formats.

Largely by trial and error I got this structure which works:

          - type: 'custom:config-template-card'
              - sensor.zone_1_average_temp
              - input_number.temp_target_z1_low
              - input_number.temp_target_z1_high
              type: gauge
              entity: sensor.zone_1_average_temp
              min: 60
              max: 90
                - from: 60
                  color: Blue
                - from: ${states["input_number.temp_target_z1_low"].state }
                  color: lightgreen
                - from: ${states["input_number.temp_target_z1_high"].state }
                  color: yellow
                - from: 80
                  color: red

I got it mostly from examples posted, but got diverted by using single vs double quotes (and still not sure when you use which as the github documentation for the card shows single but they fail here).

But I wanted to do something simple like add 0.1 to the state (basically a greater vs greater-equal). I can’t find any syntax that works.

Perhaps more to the point, I can’t figure out how to tell what each syntax actually does – if I just stick +0.1 after the state on the “low” line I get all blue, as though the line is just lost. If I put things in parentheses I get a black gauge, presumably an error but no error shown.

I’m not looking for the solution to the 0.1 issue (though I’m happy to hear), but more… how does one learn the real syntax?

I’m tired of trial and error, happy to spend some time reading, but in my search through the template stuff just as a for-example, I can’t find ${x} syntax anywhere.

Have you seen this?

See the bit very near the bottom.

I saw that, but I don’ t know how to interpret it.

Does that mean what is inside should follow the syntax of a template? So why are there no double braces and brace-percents?

More specifically then should this be?

- from: ${ {{ states["input_number.temp_target_z1_low"].state }}  }

That is accepted and works, but if I try to make it an expression, the below inner validates to the right answer in the developer/template tester, but it just makes the gauge disappear when I use this:

- from: ${ {{ states["input_number.temp_target_z1_low"].state | float + 0.1}} }

It also doesn’t work if the double braces are omitted.

This is perhaps the most frustrating thing, is that I don’t know how to debug it when I get the wrong answer. I can test in the template tester and be good, but the gauge just disappears. Maybe there’s an error in a log somewhere, but not sure where to look, the settings/logs various topics do not seem to have anything from this.

I should probably add I went to the Developer tools, Debug, and turned on the option to observe session in browser console, but if that means the F12 type console I see nothing there. So maybe I’m missing what that means as a tool.