Hi All, firstly, i’m still running OH 2.5.9 on RPi 4.
I am trying to setup a dimmer via MQTT I have working separate % value and Switch ON/OFF Thing channels that update correctly.
When i try to link then both of these to the same ‘Dimmer’ item, the % value will just jump from 0 to 100% only. (I.e. whenever it is ON, it always shows 100%, no matter what the % value is).
I’ve used ‘Dimmer’ items before and follow guidance on this forum on how to link with separate Switch and % channels and it worked fine. But it just won’t work with these MQTT things… any help greatly appreaciated!
My MQTT things:
Thing topic summerhouse_fader "Summer House Light MQTT" @ "Summer House" {
Channels:
Type switch : summerhouse_fader1_sw "Switch 1" [ stateTopic="shfader/light/fader_1r/state" , commandTopic="shfader/light/fader_1r/command" , transformationPattern="JSONPATH:$.state", formatBeforePublish="{“state”:“%s”}", on="ON", off="OFF"]
Type dimmer : summerhouse_fader1 "Fader 1" [ stateTopic="shfader/light/fader_1r/state" , commandTopic="shfader/light/fader_1r/command" , transformationPattern="JSONPATH:$.brightness", formatBeforePublish="{“brightness”:“%s”}", min="0", max="255"]
}
The item:
Dimmer sh_fader1sw "Summer house 1 switch" {channel="mqtt:topic:ada47998:summerhouse_fader:summerhouse_fader1_sw", channel="mqtt:topic:ada47998:summerhouse_fader:summerhouse_fader1"}
When i view the log, i can see the item updating to the correct value, but then straight away being over written by 0 or 100…
2021-05-17 11:07:54.912 [vent.ItemStateChangedEvent] - sh_fader1sw changed from 0 to 4
2021-05-17 11:07:54.921 [vent.ItemStateChangedEvent] - sh_fader1sw changed from 4 to 100
(FYI, the reason why i want to link both channels is so that Google home integration works with on/off and value commands).