Folks,
I’ve got the following:
Switch Kitchen_sw_Chand "Kitchen Chandelier" (g_persist_change, g_KitchenCeiling) {
mqtt="
>[mqtt:home/lights/kitchen/SON-LIGHT-KITCHEN-CHAN/relay/0/set:command:ON:1],
>[mqtt:home/lights/kitchen/SON-LIGHT-KITCHEN-CHAN/relay/0/set:command:OFF:0],
<[mqtt:home/lights/kitchen/SON-LIGHT-KITCHEN-CHAN/relay/0:state:MAP(binary.map)],
<[mqtt:home/lcheck/SON-LCHK-KITCHEN-BREAKFASTBAR/status:state:MAP(binary.map)]
"
}
Switch Kitchen_sw_Breakfast "Kitchen Breakfast Bar" <wallswitch> (
g_KitchenCeiling, g_Lights_Random, gLights, g_persist_change, gAlexaHouseStatusNotOn, g_KitchenCeilingProxy
)
{
channel="rfxcom:lighting5:0fc9779f:command",
mqtt="<[mqtt:home/lcheck/SON-LCHK-KITCHEN-BREAKFASTBAR/status:state:MAP(binary.map)]"
}
I was hoping, but not expecting, this to work. Idea is that when someone turns on the breakfast bar lights the chandelier must also turn on.
When someone turns on the breakfast bar lights a message is published on mqtt, status = 1. This works fine. OH reads this message and the Kitchen_sw_Chand item goes from off to on. All good.
However, the ON is not published back to the new topic. Should it be?
The same happens when you turn it off; the message is published, the item changes to OFF but a new message is not published.
It’s worth noting that the thing doing the publishing is a sonoff I have on the lighting circuit which publishes when it connects and the LWT message when it dies (someone turned the lights off)
I thought I could avoid a rule doing it this way. Does the 2.x binding support this? Reason to finally make the move…?
Cheers
C