How to set manually the percentage for a rollershutter

  • Platform information:
    • Hardware: Rasp PI 4B
    • OS: openHABian
    • openHAB version: 2.5 stable

Dear all, my LCN (LCN-UMR) modules don’t provide an indicator of the rollershutter, but other means I utilize to calculate the percentage (which I already use for my rules for automatic sun protection). Now I want to set manually the percentage level to ensure I see the correct value in the Basic UI.
I tried

Rollladen_west.state = 0

but I get the following error message when the rule is executed

[ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Rollladen_west fährt': An error occurred during the script execution: Could not invoke method: org.eclipse.smarthome.core.library.items.RollershutterItem.setState(org.eclipse.smarthome.core.types.State) on instance: Rollladen_west (Type=RollershutterItem, State=0, Label=Rollladen west, Category=rollershutter, Groups=[g_OG_Rollos])

What can I do?

Thank you for your help!

Rollladen_west.postUpdate(0) //Will change the value in OH but NOT send the value to the device
Rollladen_west.sendCommand(0) //Will send the value to the device (And update the value in OH if autoUpdate is true (default))

Thank you, postUpdate is doing exactly what I want.

Thank.

Some reading to do: https://www.openhab.org/docs/configuration/rules-dsl.html#manipulating-item-states