[SOLVED] Converting an item from openHAB 1 to openHAB 2

Hello,

I need help re-configuring these items to function on openHAB 2.

//ESP Dimmer 1 Switch
Switch        ESP01Switch    "Armtronix Light"    <light>    (All,Random_Switches)    {mqtt=">[mosquitto:/esp/dimmer01/sub:command:on:R13_ON],>[mosquitto:/esp/dimmer01    /sub:command:off:R13_OFF]"}
//ESP Dimmer 1 Slider
Dimmer        ESP01Dimmer    "Armtronix Dimmer [%d %%]"    <slider>    (All,Quick_Access,Random_Dimmers,Morning,BedTime)     {mqtt=">[mosquitto:/esp/dimmer01/sub:command:*:Dimmer\\:${command}]"}

Should I attempt this through a Paper White Thing? Or do I attempt binding with this configuration?

Here’s a 3D housing and build instructions if you want your own. https://www.thingiverse.com/thing:3453207

That depends on which MQTT binding you are intending to use. The version 1 binding would work just with the items as in oh1, the version 2 binding does need things. In case of version 2 read the documentation and/or the multiple threads on that topic in the forum.

I’ve made progress and got the on/off function working. I’ll ask about how to convert a dimmer from a decimal to a an integer.