From sitemap to MainUI: INCREASE and DECREASE commands

Hi,
I’ve migrated from OH2 to OH3 and now I’m converting my sitemap to MainUI pages using the semantic model.
In the OH2 sitemap I had this item:

Dimmer CanalTVSalonTV "Canal TV" <screen>

And this in the sitemap:

Switch item=CanalTVSalonTV mappings=[DECREASE='-', INCREASE='+']

Which translated to this UI:


When I click on “-” and “+” I get DECREASE and INCREASE commands sent to the item.
Now in OH3 I have:

Dimmer CanalTVSalonTV "Canal TV" <screen> (smSalonTVSalon) ["Setpoint"] {commandDescription="" [options="DECREASE=-,INCREASE=+"],listWidget="oh-stepper-item" [buttonsOnly=true]}

Which translates to this in MainUI (Overview/Locations page):


But when I click the buttons now I get an integer sent to the item.
How can I get INCREASE and DECREASE commands sent as before?
Thanks.

That is all you will ever get with a stepper component. It cannot send anything but numerical commands.

For this you will have to create your own custom widget. There’s a great step-by-step tutorial on in the Getting Started section of the docs that shows you the basics of how to create a list item and set it as the default list item used by the UI model cards. In this case you’re going to want to create a list item with two buttons, one which sends and INCREASE command and one which sends a DECREASE command.

This isn’t a 100% trivial task for someone who hasn’t done this before, but once you work through this first project, you’ll be well on your way to being able to do anything you’d like with the new UI. When you get it working, you may even want to post it to the widget marketplace. I’m sure you’re not the only one who would benefit from an increase/decrease list item widget.