Template widget - how to display items

I have started using a template widget to display a local html file.
That works well for html stuff.
But how can I display the value of an item.
I have an item called sunrisetime which refers to the astro binding sunrise_time
I have seen some examples where they use

{{itemValue(‘sunrisetime’)}}

to display the the sunrise time. But this does not work.
I tried also some variations with itemvalue and tried to usethe thing name. None of this did work.
What I see is

Sunrise {{itemValue(‘sunrisetime’)}}

What is the right way to get a value of an item displayed ?

That’s correct for most of the items.
I suppose your item is a DateTime type.
Let’s try

<div>{{itemValue('sunrisetime') | date:'MMM d, HH:mm'}}</div>

Otherwise check that the item value is correct with classic UI or the console to be sure it is not a item configuration problem

Bye Lorenzo

Thank you for this hint.
Unfortunately it does not solve my problem.
This is my items.conf

DateTime Sunrise_Time_1 “Sunrise_1 [%1$tH:%1$tM]” { channel=“astro:sun:home:rise#start” }

This is the content of the template widget

< div>
< iframe style=" width: 100%;height: 500px;" src=“/static/test2.html”>
< /iframe>
< /div>

As I have problems to quote this html snippet I was forced to enter a blank after the “<”. It is correct in my template widget.
And here is the content of the final html file (referenced by the template widget

<table style="width: 100%; border-collapse: separate; border-spacing: 4px;">

  <tr>
    <td colspan=3 style="padding: 0;"><h4 style="color: #ffaa00; line-height: .1em;">Astro Data</h3></td>
  </tr>

  <tr>
    <td style="border: 2px solid #76899e; border-radius: 10px;">
      <table style="width: 100%;">Sun
        <tr>
          <td><div>Sunrise {{itemValue('Sunrise_1') | date:'MMM d, HH:mm'}}</div></td>
        </tr>
        <tr>
          <td><div>Sunrise {{itemValue('Sunrise_Time_1') | date:'MMM d, HH:mm'}}</div></td>
        </tr>
      </table>
    </td>

  </tr>
</table>

I tried both names from the item definition.

The output looks like this

Astro Data
Sun
Sunrise {{itemValue(‘Sunrise_1’) | date:‘MMM d, HH:mm’}}
Sunrise {{itemValue(‘Sunrise_Time_1’) | date:‘MMM d, HH:mm’}}

I added a dummy widget with the item “Sunrise_Time_1” and your format. That displays correctly.

As this topics is still open I made some more attempts to check the behaviour and try to locate my fault.

I added another template widget and I put the whole html code in the widget. Now the items are correctly evaluated and I see the values as expected.

So I added the iframe-statement to include the html-file. And now I see that the code in the widget works different from the html-file. The part in the template widgets evaluates the values and in the html file not.
Even correcting the external html code to a correct html file (with html and body) does not change anything
I was expecting that the iframe statement just “includes” the html code ?
What is wrong with my idea ?