[Solved] Update Slider by Mqtt from Shelly device

hi,
I’m using Openhab 2.4 with the Mqtt2 Binding.
I try to update the Slider Value by a Mqtt state from a Shelly 2.5 device, but it´s still not working.
How can i Update the Slider? The position will shown correct. But between the real position and the Slider Value are differences.

my
mqtt.things

Type number : position "Position" [ stateTopic="shellies/shellyswitch25-xxxxx/roller/0/pos", commandTopic="shellies/shellyswitch25-xxxx/roller/0/command/pos"]

shelly.items:

Number shelly_wozi_2_pos "Rollo_wozi_ost Position [%d ]" { channel="mqtt:topic:hubschraube:Rollo_wozi_ost:position" , autoupdate="false" }

Dummy.items
Rollershutter Roller_wozi_2_pos

Thanks for Help
Andre

Use a rule to postUpdate the new position to the dummy item

OK thanks.
I had already thought about something like that, but I hoped I could do it without it.
But how do I do that?
Roller_wozi_2_pos.postUpdate(shelly_wozi_2_pos)
is not working.
shelly_wozi_2_pos ist from Type Number
What expects the Slider Item or Rollershutter ?

You have to use the state, not the item itfself:

rule "update dummy"
when
    Item shelly_wozi_2_pos changed
then
    if(shelly_wozi_2_pos.state instanceof Number)
        Roller_wozi_2_pos.postUpdate(shelly_wozi_2_pos.state as Number)
end

Thanks for the rule.
Now my Slider updates…