Trying to add an item (template?)

Just having a first look at habpanel. The tutorial (Template widget - tutorial & examples - make your own widget!) made a new widget.

So I have one thing in my OH2 instance, a zwave sensor.

So I made a dashboard, then said new template, and posted in the device address (which I had to get from the paper ui - how in habpanel are you supposed to get the item names?)
Now there’s a template with the following code:
It's {{itemValue('zwave:device:8862ff02:node6:sensor_temperature')}}

But it seems to get an N/a. I’ve obviously missed something. I got quite used to the 1.8 items/sitemaps model and the move to OH2 seems to be quite a learning curve.

Hello there,

first of all, you should add an item for your zwave device. I guess you did that already, so you should do the following:

  1. Get to the config page of habPanel. You can select themes there and on the right side there is a button to manage custom widgets. Click this one.

  2. Create a new custom widget, give it a name, click on ok. After that, click on the created widget.

  3. Now you should see the texteditor. Type in

It's {{itemValue(config.my_item)}}
  1. Now switch over to the tab “settings” and add a setting. As type choose item, as ID type in my_item and as label type in Select a item

  2. Save everything

  3. Go to your dashboard layout, and add the created custom widget to your dashboard. After that, head over to the config menu of the widget and choose your zwave sensor item.

  4. Save & run

Let me know if it works

Ok.So in paper ui I can see the temp running off that zwave device. So I assume that’s your first point about adding the item.

I have a dashboard (it shows up in the main left hand habpanel panel called zwave.
I hit the pencil on that to get to edit mode, and see the add widget button on the right.
I create a custom widget called z_multisensor1_temperature with the code of: (2)
It's {{itemValue('config.zwave_item')}} (3)
I’ve added a setting for the widget of type item, id of zwave_item and label of “Select a Item” (4)
Then back to the zwave panel, I add the z_multisensor1_temperature widget then go into the edit and on the Select a item drop down choose zwave_device_8862ff02_node6_sensor_temperature save, then Run

But I get a It’s N/A as the value (I also tried using the save widget for a network item, and it also reports n/a. So something in my specifying the {{itemValue(‘config.zwave_item’)}} and displaying the widget has gone awry.

It should be:


remove the quotes ’

Ahh champion. That worked.