Linked a dimmer to follow a switchitem

I have a dimmer to follow a itemswitch that works dimmer goes to 100% when itemswitch is on.

Can someone help me so the dimmer goes to 12% from when itemswitch is ON

Two options I can think about right now:

1st via rule:
Do not link the dimmer item to the switch channel

Have a switch item linked to the switch channel

Create a rule, when the switch item will change to on, that the dimmer will go to 12%

2nd via profile:
Keep the dimmer item linked to the channel

Within the channel-item link: Instead of using the standard profile use a custom profile (e.g map transformation, needs to be installed separately first) to convert ON/100% to 12%

// Possible rule solution

rule "LinkedDimmer"

when Item itemswitch changed to ON

then

dimmer.sendCommand(12)


end