Don't read unsupported 'occupied to unoccupied delay' for Xiami motion sensor
@@ -4670,7 +4670,14 @@ bool DeRestPluginPrivate::processZclAttributes(Sensor *sensorNode)
}
}
+
if (sensorNode->mustRead(READ_OCCUPANCY_CONFIG) && tNow > sensorNode->nextReadTime(READ_OCCUPANCY_CONFIG))
+ {
+ if (sensorNode->modelId().startsWith(QLatin1String("lumi.sensor_motion")))
+ {
+ sensorNode->clearRead(READ_OCCUPANCY_CONFIG);
+ }
+ else
{
std::vector<uint16_t> attributes;
attributes.push_back(0x0010); // occupied to unoccupied delay
@@ -4681,6 +4688,7 @@ bool DeRestPluginPrivate::processZclAttributes(Sensor *sensorNode)
processed++;
}
}
+ }
if (sensorNode->mustRead(WRITE_OCCUPANCY_CONFIG) && tNow > sensorNode->nextReadTime(READ_OCCUPANCY_CONFIG))
{
