I built a bit further on @eliotstocker version of the bulb because I saw some issues with scenes. E.g. the bulb did not turn on when setting a scene, and in CT mode the dimmer level was missed due to the way scenes operate the bulb in CT mode.
Fixes from @eliotstocker version:
- Use asynchronous zigbee messaging so that dimmer level is not missed when operating in CT mode in a scene setting
- Added the possibility to turn on and off debug and trace info
- Also added support for the rate field in setLevel, i.e. it can be controlled how fast the bulb dim to the new setting.
Raw link: https://raw.githubusercontent.com/ivarho/hubitat-ikea-rgbw/main/ikea-tradfri-rgbw-device.groovy