triggering switch test1 sends a ‘test1’ to topic ‘/test/’ with retain, which is not expected.
triggering switch test2 sends a ‘1’ to topic ‘/test’ without retain, as expected.
Why is the retain flag set for ‘test1’?
things:
Bridge mqtt:broker:mosquitto “bridge: mosquitto” [ host=“xxx”, secure=false ]
{
Thing topic test2 “thing: test2” {
Channels:
Type switch : test2 “test2” [ commandTopic=“/test” ]
}
}
items:
Switch test1 “Test1”
Switch test2 “Test2” { channel=“mqtt:topic:mosquitto:test2:test2” }
rules:
rule “test 1”
when
Item test1 changed
then
val mqttActions=getActions(“mqtt”,“mqtt:broker:mosquitto”)
mqttActions.publishMQTT(“/test”,“test1”)
end
sitemap:
Switch item=test1 Switch item=test2