Translating rollershutter position for Item

  • Platform information:
    • Hardware: ODROID N2+
    • OS: UBUNTU
    • Java Runtime Environment: 17
    • openHAB version: 4.1.3
  • Issue of the topic:
    Im using ZIGBEE rollershutter module running TASMOTA on zigbee bridge. Unfortunately, when using zigbee modules, endpoint calibration is not supported. Lower endpoint is on position 0, upper endpoint on position 25.
    Now I like to configure the Item to interprete incoming 25 as 100 to tell any widget its fully open. And vice versa…

I already tried to use Gain Transformation but I receive errors in logfile indicating mismatching value types and what not…

Anyone here with a simple approach to transform values?

It’s not clear from the description. How is OH communicating with this device? Zigbee, MQTT, something else?

What specifically did you try with the Gain (Profile? there isn’t a Gain transformation I’m aware of). What errors did you see?

Most likely you’ll need two script transformations, on to convert the incoming number to a value between 0 and 100 and rounding the decimal to the nearest integer since RollerShutters don’t support decimals. The second one takes the value between 0 and 100 and converts it to a value between 0 and 25.

Or you could just use a Number Item and configure the widget to only use values between 0 and 25.