I am trying to setup a dimmer using a mqtt generic thing. Basicly it works, changing the duty cycle (values between 0…100) are logged in the log files. When inspecting the mqtt traffic the value is divided by 100, so 50% results in a mqtt command to 0.5.
My thing code looks like:
UID: mqtt:topic:abcd label: MQTT Bench thingTypeUID: mqtt:topic configuration: payloadNotAvailable: Offline availabilityTopic: tele/bench/LWT payloadAvailable: Online bridgeUID: mqtt:broker:ad84a2b039 channels: - id: Switch channelTypeUID: mqtt:switch label: Bechn Switch description: "" configuration: commandTopic: cmnd/bench/POWER stateTopic: stat/bench/POWER off: OFF on: ON - id: Dimmer channelTypeUID: mqtt:dimmer label: BenchDimmer description: "" configuration: commandTopic: cmnd/bench/Dimmer min: 0 stateTopic: stat/bench/RESULT transformationPattern: JSONPATH:$.Dimmer max: 100 on: "100"
2021-09-29 20:55:27.364 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'MQTTBechn_BenchDimmer' received command 55 2021-09-29 20:55:27.376 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'MQTTBechn_BenchDimmer' predicted to become 55 2021-09-29 20:55:27.389 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'MQTTBechn_BenchDimmer' changed from 0 to 55 2021-09-29 20:55:27.522 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'MQTTBechn_BenchDimmer' changed from 55 to 0
So min and max in the yaml code should be used to scale the input(?!) but it doesn’t.