Value template how to treat the space character in REST json

Hi, my problem is in a value template.
I want to extract a data from a web (rest json), but when I try to enter it as an HA sensor, it gives me an error due to the blank spaces (at the end of the value template line).
How should I do it ?

Try it with:
{{ states.sensor.origendatos.attributes.ListaEESSPrecio.923['Precio Gasoleo A'].state }}

You can play with it in Developer Tools/Templates.

1 Like

Hi ,first thanks for your help . but still have issue .
In the developer tools seems working , but i check the config HA indicate a problem .
I paste what i talk about :
image

image

Remove the single quotes around the template or use double quotes if you need them.
"{{ states.sensor.origendatos.attributes.ListaEESSPrecio.923['Precio Gasoleo A'].state }}"

1 Like

That´s it , thanks a lot . Close the issue.