How to make an item editable in the model


I’m trying to create an item to set a desired value for illuminance.
How can I make it editable in the model?

Item’s code:

label: Corridor Illuminance Set Point
type: Number:Illuminance
category: ""
  - CorridorLightDimmer
groupType: None
function: null
  - Light
  - Setpoint
  - Point

This item is not editable in the model. All I can do is to see its current value and a graph with historical values.

You need to set the category to setpoint or dimmer…

Thank you for the answer.

I’ve tried to set a category value to “dimmer” and “setpoint”. No luck. The item is still not editable.

I’ve tried to search OpenHAB documentation (here and here in particular, but not limited to these pages) about “categories” and their connections with a “semantic model”, didn’t found anything.

As far as I understand, an item’s “type”, “semantic class” and “semantic property” are what is important for the semantic model.

They were from the beginning and the item in question is not editable, nonetheless.

Thank you for the answer.

Sorry, I forgot to mention, that I tried to set some metadata before asking the question.

I’ve tried to set a default list item widget to “Input List Item”, but the only change was that I no longer can go to historical graph.

Is there some particular piece of metadata you’ve meant to be found from the link you provided?

I don’t use UI defined stuff but here is an example in file based items using lux

Number Detection_lux_office_detector_constant "Detection constant lux max office [%.1f lux]" <sun> (g_office_detector_constant) ["Control"] {channel="knx:device:bridge:knx:detection_lux_office_storage_motion_sensor_output_constant", listWidget="oh-stepper-item" [step=10, min=10, max=1000,autorepeatDynamic=true,large=true,after="lux"], widget="oh-stepper-item" [step=10, min=10, max=1000,autorepeatDynamic=true,large=true,after="lux"] }

So set to oh-stepper-item

Stepper item changed an appearance of the widget, but it errors on plus or minus button pressing.

I’ve inspected an item description you’ve provided and noticed that in your case an item is linked to a channel. I think that’s why an item is editable in your case.
In my case there’s no channel to link an item to because it is intended to be used in scripts as a reference value for a target illuminance.

I already have another item of a “switch” type, that is not linked to any channel. It is editable from a model and is used in scripts just fine. So I didn’t expected any troubles in that front.

Do you have any suggestion how to use an item without connecting it to any channel?

An item it’s an item doesn’t matter if it’s linked or not.

Your are trying to use this in a listWidget=“oh-stepper-item” not an standalone widget.
Again I never did UI stuff configuration but I think you have to select metadata with list widget

Oh and make sure you give it an default value you can use rest API rule karaf or even an oh-input

Seems like the “default value” was the critical thing I’ve missed.

It’s now possible to edit a value of the item in question from model widgets.

Thanks for your help.

Don’t forget to setup persistance with restoreonstartup So a clear cache or whatever will not break it again.

Thanks for the advice.
It’s done with mapdb.