Issue with dimmmer item

Given one dimmer item, e.g.

Dimmer MyDimmer "My dimmer" {}

on a Basic UI sitemap:

Default item=MyDimmer label="My dimmer"
Default item=MyDimmer label="My dimmer [%d %%]"

The first Widget is able to change the brightness, but does not show the state.
The second Widget does show the percentage state, but it’s not possible to change the brightness.


23:21:34.361 [WARN ] [.rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/MyDimmer' with an invalid status value '33 %%'.

Version is openHAB 2.3.0 Build #1264

Hi Udo,
Did you try using the Slider type instead of Default

Slider item=MyDimmer label="My dimmer"
Slider item=MyDimmer label="My dimmer [%d %%]"

What does that do?

Sorry, forgot to mention… Slider instead of Default has no effect (I think Default internally does a link to Slider if using a Dimmer item)

EDIT: But I found the solution: Don’t set the dimension but use

Slider item=MyDimmer label="My dimmer [%d]"

This will cause openHAB to write the number, and as Sliders are of type percentType, the Dimension % will be added… (However, this will not work with Default Widget)

1 Like