Fix creating sensor resource for Xiaomi QBKG03LM
@@ -2680,14 +2680,20 @@ void DeRestPluginPrivate::addSensorNode(const deCONZ::Node *node, const deCONZ::
}
else if (modelId == QLatin1String("lumi.sensor_86sw1") ||
modelId == QLatin1String("lumi.sensor_86sw2") ||
- modelId == QLatin1String("lumi.ctrl_neutral1") ||
- modelId == QLatin1String("lumi.ctrl_neutral2"))
+ modelId == QLatin1String("lumi.ctrl_neutral1"))
{
if (i->endpoint() == 0x01) // create sensor only for first endpoint
{
fpSwitch.inClusters.push_back(ci->id());
}
}
+ else if (modelId == QLatin1String("lumi.ctrl_neutral2"))
+ {
+ if (i->endpoint() == 0x02) // create sensor only for second endpoint
+ {
+ fpSwitch.inClusters.push_back(ci->id());
+ }
+ }
else if (modelId.startsWith(QLatin1String("lumi.sensor_switch")))
{
fpSwitch.inClusters.push_back(ci->id());
