I have a thing that uses this configuration:
Type dimmer : Brightness [ commandTopic="com", stateTopic="stat", formatBeforePublish="%.0f", min=0, max=254, step=1 ]
When I send the command 85 to this channel it gets transformed and published as 216. Then that gets delivered to the device, which sets itself to the 216 and publishes the new status, 216. The 216 arrive at openHAB, then openhab does the division by 254 and multiplies that with 100 and the result is 85.03937007874015748031496062992126. So the item changes to it. This breaks my rules as they detect this as a change that was caused by an external device, so what I would need is a way to turn the incoming value into an int so there is no change and my “changed”-rule isn’t triggered. Is there any way to do this without a transformation? I think using a transformation would make this even more complicated so I hope there is something easier, just like I can force the outgoing value using the formatBeforePublish option.