Consider PR comments
@@ -38,10 +38,11 @@ void DeRestPluginPrivate::handleOccupancySensingClusterIndication(const deCONZ::
{
isReporting = true;
}
-
- // Read ZCL reporting and ZCL Read Attributes Response
- if (isReadAttr || isReporting)
+ else
{
+ return; // neither ZCL Report nor ZCL Read Attributes Response
+ }
+
const NodeValue::UpdateType updateType = isReadAttr ? NodeValue::UpdateByZclRead : NodeValue::UpdateByZclReport;
bool configUpdated = false;
@@ -256,12 +257,3 @@ void DeRestPluginPrivate::handleOccupancySensingClusterIndication(const deCONZ::
queSaveDb(DB_SENSORS, DB_SHORT_SAVE_DELAY);
}
}
-
- if (!isReporting)
- {
- if (!(zclFrame.frameControl() & deCONZ::ZclFCDisableDefaultResponse) && ind.dstAddress().isNwkUnicast())
- {
- sendZclDefaultResponse(ind, zclFrame, deCONZ::ZclSuccessStatus);
- }
- }
-}
