Openhab 3.2 Dimmer sending value 88 as 0.88 to MQTT

  • Platform information:
    • Docker
    • Broker binding connecting to mosquitto.
    • openHAB version: 3.2

I am manually migrating my openhab 2.5 to 3.2. (GUI-only)

So i created a dimmer item which should send the value to an MQTT item.
But somehow it sends the value in the Dimmer item to MQTT divided by 100.
In this case i need it to send from 0 to 100, (0 - 1024 needed later). How can i manage that?
One thing which is also strange: i can only link from the Dimmer Item to the MQTT thing, not the other way around…

Eventlog says:

2022-02-23 21:05:37.545 [INFO ] [openhab.event.ItemCommandEvent ] - Item ‘GF_Hall_StairwayDimmer’ received command 88
2022-02-23 21:05:37.547 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item ‘GF_Hall_StairwayDimmer’ predicted to become 88
2022-02-23 21:05:37.552 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘GF_Hall_StairwayDimmer’ changed from 56 to 88

In the binding i can see the value is 88%. But in MQTT it sends

Fusebox/light/pwm1 0.88

This is the Channel configuration

  • id: GF_Hall_Stairwaylight
    channelTypeUID: mqtt:dimmer
    label: GF_Hall_Stairwaylight
    description: “”
    configuration:
    commandTopic: Fusebox/light/pwm1
    min: 0
    formatBeforePublish: ‘“%.2f”’
    max: 100

The channeltypeUID is afterwards manually set to dimmer. When creating the Channel there was no possibility to create a dimmer channel. For my issue described it does not make any difference…

Why is MQTT sending 0.88 instead of 88 ? I also read this post: OH3: Generic MQTT thing - Channel Item Dimmer It would be genius if it works like that…
and this one… Weird behavior of Dimmer in combination with a Generic MQTT Thing - #4 by hafniumzinc The solution provided here seems not to work for me… Added the State Description Metadata…

totally lost here… anyone?

You cannot do this . Unfortunately you will have to start again by making a new Channel. Choose the percent type Channel - this is the dimmer one.

Thanks a lot @hafniumzinc ! This is what was unclear to me, had no idea that i should choose the percent type for dimmer items… It works now.
And even the min-max translations are working flawless. So i am a happy guy!