Hi there,
I’m pretty new to programming custom widgets for HABPanel. To get more familiar with custom widgets, I’m working on a very simple example. The only thing I want to do is to show the temperature from a sensor which is linked to openhab via the jeelink binding.
After installing the sensor with the binding, the right value is shown in my paper UI under “controls”. So the sensor and the binding seem to work.
To create the custom widget I use the very simple code:
The temperature is {{itemValue(‘Cur_Temp’)}}
In this code I have a reference to the item ‘Cur_Temp’ which inputs the temperature value from the sensor. To initialize that item, I have created a txt-file with the name temp.items in the folder \OPENHABIANPI\openHAB-conf\items with the following code:
Number Cur_Temp “Temperature [%.2f °C]” {channel=“jeelink:lacrosse:30:temperature”}
And that is where my problems begin. No matter what I do, the ouput auf my widget is:
The temperature is N/A
For some reason the item does not work and I don’t know how to solve the problem. I have deleted the cache of my browser, restarted my raspberry pi (=openhab server) and so on… the result is always the same.
Can anybody help me with that problem? Thank you very much in advance!