I just finished something similar. I used a Ws2812B LED so it can change colors.
Arduino Sketch Code Bender Sketch
And Openhab items
Switch Light "On/OFF" (gKR) {mqtt=">[mysensors:/MyMQTT/20/2/V_LIGHT:command:ON:1],>[mysensors:/MyMQTT/20/2/V_LIGHT:command:OFF:0]"}
String KidLight (All) {mqtt=">[mysensors:/MyMQTT/20/1/V_VAR1:command:*:default"}
Color RGBKidLight "Kid Light" (All,gKR)
and openhab.rule
import org.openhab.core.library.types.*
import org.openhab.model.script.actions.*
rule "Set RGB value RGBKidLight"
when
Item RGBKidLight changed
then
val hsbValue = RGBKidLight.state as HSBType
val brightness = hsbValue.brightness.intValue
val redValue = ((((hsbValue.red.intValue * 255) / 100) * brightness) / 100).toString
val greenValue = ((((hsbValue.green.intValue * 255) / 100) * brightness) / 100).toString
val blueValue = ((((hsbValue.blue.intValue *255) / 100) * brightness) / 100).toString
val color = redValue + "," + greenValue + "," + blueValue
sendCommand( KidLight, color )
end