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 ?
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
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 ?