I have a slider that shows the numbers from 0 to 254. Instead, I want the slider to display 0-100%
I tried to use javascript transform, but that has no effect on the number format on this slider. In know the transform works, because if I use a “Default” item instead of a Slider item it works.
So, I get the following error. And how do I link the Dimmer item to both the the switch and the brightness channel?
2023-09-05 12:16:00.674 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'QueryablePersistenceService.query()' on 'org.openhab.persistence.rrd4j.internal.RRD4jPersistenceService@1fe595c0': Value must be between 0 and 100
And plenty of warnings like:
2023-09-05 12:24:47.148 [WARN ] [transport.mqtt.internal.Subscription] - A subscriber of type 'class org.openhab.binding.mqtt.generic.ChannelState' failed to process message '38' to topic 'zigbee2mqtt/robbDimmer_ff_masterbedroom_center2WL/brightness'.
At least, I got it partly solved → you should use Type dimmer in the Things definition.
The slider works now really nice (and it is easier than the transformation)
Linking the dimmer item to a switch item in the sitemap does not work correctly. It shows the state and the percentage. But as soon as you make a change with the slider, the state shows OFF (which it is not) → so I keep the original switch item.