Link switch to a dimmer channel with a profile

  • Platform information:
  • openHAB version: 3.2M4
  • Issue of the topic: I want to create a switch item that reflects if my dimmer is on ( dimmer > 0 )
    I installed the Scale transformation
    I setup a transform file DimmerToActiveStatus.scale
[..0]=OFF
]0..100]=ON

I linked a Switch to the dimmer

I set the profile on the link

The switch item becomes on when the dimmer is set above 0, but it never turns off

==> /var/log/openhab/events.log <==
2021-11-11 18:03:22.776 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'OfficeLightOnState' received command OFF
2021-11-11 18:03:22.776 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'OfficeLightOnState' predicted to become OFF
2021-11-11 18:03:22.782 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'OfficeLightOnState' changed from ON to OFF

==> /var/log/openhab/openhab.log <==
2021-11-11 18:03:24.067 [WARN ] [rm.AbstractFileTransformationService] - Could not transform 'OFF' with the file 'DimmerToActiveStatus.scale' : Scale must be used with numeric inputs, valid quantity types or a 'NaN' entry.
2021-11-11 18:07:26.554 [WARN ] [rm.AbstractFileTransformationService] - Could not transform 'OFF' with the file 'DimmerToActiveStatus.scale' : Scale must be used with numeric inputs, valid quantity types or a 'NaN' entry.

Any guidance on what I’m doing wrong?

There’s no profile required in this case. You can link a switch item directly to a dimmer channel and it will automatically behave as you have tried to outline in your scale.

1 Like

To be a bit more precise, link the switch item to the brightness channel of the thing.

Thank you

It works as expected.

I was overthinking it before trying the simple thing