Link Dimmer Item to Color channel

For various lighting bindings it should in theory be possible to link a Dimmer Item and a Switch item to the color channel. However in Main UI this seems not to be possible because Main UI insists to have a profile for the link. Am I missing something here?

EDIT: is there a bug in Main UI? Should it not be possible to select Default (i.e. no) profile?

This should be possible. If MainUI is preventing it that’s a bug. You should be able to link a Switch to a Dimmer Channel and a Switch or a Dimmer to a Color Channel.

Though I wonder if that’s right. Since you can send a Dimmer command or a Switch command to a Color Item, wouldn’t it be sufficient to just have a Color Item that you treat like a Switch or a Dimmer? But the opposite isn’t true. You can’t command or update a Switch with a ColorType, for example, as far as I know. So converting would have to be implemented by the binding.

In a rule, in cases where you have access to the raw Java Item at least, there’s the getStateAs() method: MyColorItem.getStateAs(OnOffType) or MyColorItem.getStateAs(PrecentType).

So maybe the current behavior is right? I’m not certain.

Indeed. It is possible to link items in this way via a .items file and via the REST API. However MainUI prevents it; specifically it requires a profile, but the appropriate “default” profile is grayed out. I have opened a bug report in WebUI

—-

BTW @rlkoshak your concerns about the channel being able to update such items are not valid; the existing OH core does that — see the screenshot in the Issue mentioned above.