How to control switch 'state_l1' in Zigbee2MQTT

I'm using an MS-104BZ device with two gangs, and I would like that when I say 'Alexa, turn off the office light,' gang 1 is turned off.

In other words, how to pass the payload '{"state_l1": "ON"}' to Zigbee2MQTT

Any ideas on how I can do this?

image

image

image

I do not use the zigbee2MQTT node so I can only suggest that you use an ordinary MQTT out node, and you would send;

msg.topic = zigbee2mqtt/${deviceName}/set
msg.payload = {state_l1: 'ON'}

Have you checked both the Command and Options dropdowns for a state_l1 option?

Thank you for your feedback. I was able to resolve the situation by sending the payload as per the following example

image

if (msg.payload) {
    msg.payload = {"state_l1": "ON"};
} else {
    msg.payload = {"state_l1": "OFF"};
}
return msg;

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.