Open zuhair68 opened 3 years ago
For the benefit of all, I solved it!
{
"accessory": "mqttthing",
"type": "switch",
"name": "Basement Entrance 1",
"url": "mqtt://192.168.3.100:1883",
"username": "username",
"password": "password",
"logMqtt": true,
"mqttPubOptions": {
"retain": true
},
"topics": {
"getOn": {
"topic": "zigbee2mqtt/zSwitchBasementEnt",
"apply": "return JSON.parse(message).state_right === 'ON' ? true : false;"
},
"setOn": {
"topic": "zigbee2mqtt/zSwitchBasementEnt/set",
"apply": "return JSON.stringify({state_right: (message ? \"ON\" : \"OFF\")});"
}
}
}
Hi, I'm unable to add Xiaomi QBKG24LM switch https://bit.ly/3vslrgg This is the configuration I'm using, which is not working:
This is the zigbee2mqtt documentation for that switch:
Switch (right endpoint) #