How to set numeric value other than percentage

I need to set initial state of my gasmeter (sending by MQTT something like: Topic: “heating/GasMeterSet” Value: “43576.3”)
How to set and send such number from openHAB2 Basic UI. I tried to create an item:

Number GasMeterSet "initialisation of gasmeter [%.1f m3]" <settings> (gK) {mqtt=">[broker:heating/GasMeterSet:state:default]"}

and I added it to sitemap:

        Text item=GasMeterSet

but the field is not editable. It seems to me, that Dimmer item type is for setting values, but AFAIK it works only with percent values.

Thanks for any help


You can use a setpoint but if what you are really looking for is a text field where you can type in the number I’m afraid you are out of luck. That is one thing not currently supported by BasicUI.

You are correct, Dimmer only accepts percent values. But if you put your Number Item on the sitmap as a Setpoint you will get up/down arrows and can increase/decrease as needed. But if you need to send values that are far apart, you will probably need some other approach. Some ideas:

  • a webview with a form that lets you enter the text manually and posts the new value to the Item through the REST API
  • look into Habpanel, I don’t know if it has something for this yet or not
  • set up a binding that lets you publish a value (e.g. email, IFTTT, Pushbullet, etc)