Sensor not available via ui (no programmer)

Hello,
I am trying to create a sensor that cannot be reached from a climate entity, namely the current temperature to put this in a graph. But because I am not a programmer and actually know nothing about yaml, I searched the internet for similar code and then adapted it to my identities. I have tried different pieces but nothing seems to work, my sensor remains unavailable. I would be grateful if anyone could help me.
Kind regards, Marc


  1. Your source entity_id is longer than you used in the template.
  2. Define a template w/o quotes, i.e try with
{{ .... }}

instead of

"{{ .... }}"

I removed the quotes and restarted HA but the sensor remains unavailable


  1. No need to restart. The template sensor (created in UI) is reloaded when you save it.
  2. You could have missed my remark about a source entity_id: on some screenshot above you have a longer entity_id than one used in the template.
  3. Use Dev tools → Template to test your templates before using them in sensors.

It works.
Thank you

Suggest you to specify explicitly what was wrong & what helped you to fix your issue - for other users. This Community is not only for you.

When I asked the question on the forum, I had already searched a lot on the internet and copied a lot of code. I had never worked with templates before. The first comment about the double quotes was clear and I immediately deleted the other comment “Your source entity_id is longer than you used in the template.” I did not understand at first.
When I got the same comment the second time and looked at the code carefully, I suddenly saw the error. Probably due to the frequent copying and changing, a part of my id had been deleted.
I then went to development tools, states, and searched for my entity_id and copied it to my template and it worked.


Thanks again for the quick help

1 Like