Sitemap cannot be generated with Slider bound to number item

Created a page (using the UI) with a slider connected to a bulb white color temperature which can go from 2202 to 6500. Which also is set as min and max value on the slider After saving the there’s an error in the log an the Page is noch showing inside the basic ui. The error is:

Cannot build sitemap page_2625964428
java.lang.ClassCastException: class java.math.BigDecimal cannot be cast to class java.lang.Integer (java.math.BigDecimal and java.lang.Integer are in module java.base of loader 'bootstrap')

Slider definition is:

Slider icon="colorlight" label="Farbtemperatur" item=BirneSofaRechts_Farbtemperatur minValue=2202 maxValue=6498 sendFrequency=100

any idea how to deal with that?

Thnx,
Matthias

Is that problem shown in a webbrowser or on a smartphone?

Could you show the definition of the item and if it is a mqtt item the item definition.

Doesn’t matter …tried that on desktop and mobile. Error is thrown on saving the sitemap.
The item ist declared as followed:

  • Item Type: Number
  • Semantic Class: Point
  • Semantic Property: None

Thing Type is: Color-Temperature Light
(Thing connected using deconz binding)

Slider can only work with a decimal type I think which means it only really works with those Items that carry a PercentType state (Dimmer, Rollershutter, etc.). The error is indicating that it can’t convert between BigDecimal (which holds a floating point number and which is what DecimalType that is held by a Number Item uses) and Integer. Based on that I’d say that a Slider cannot be used with a Number Item.

Sounds like a problem with the UI editor.

You might try hand editing your sitemap,

Number test1 "test one [%s]"

sitemap

Slider item=test1 minValue=2202 maxValue=6498 sendFrequency=100

works in OH2 with BasicUI

2021-03-15 18:08:41.562 [ome.event.ItemCommandEvent] - Item 'test1' received command 3981
2021-03-15 18:08:41.589 [vent.ItemStateChangedEvent] - test1 changed from 87 to 3981
2021-03-15 18:08:43.521 [ome.event.ItemCommandEvent] - Item 'test1' received command 6498
2021-03-15 18:08:43.531 [vent.ItemStateChangedEvent] - test1 changed from 3981 to 6498

Note that for this application you might use an ordinary 0-100 Dimmer and transform it to/from the other scale at the channel.

Tried that …actually nothing changed. Switched now to setpoint which works but not so comfortable as a slider would do. But the error with slider is still weird :frowning:

What, the editor you used to manually edit your sitemap file reported the same error as MainUI?

exactly …but now tried something new. Edited the metadata on the item. Added a state description with min 2400 and max 6500 (step 10). Now added a slider to the sitemap with min and max value as used before.
No more errors and the slider is doing well …strange.