diff --git a/src/controller/python/ChipDeviceController-Discovery.cpp b/src/controller/python/ChipDeviceController-Discovery.cpp index 833ff84a4dff3a..eda6bf0b46308a 100644 --- a/src/controller/python/ChipDeviceController-Discovery.cpp +++ b/src/controller/python/ChipDeviceController-Discovery.cpp @@ -141,8 +141,7 @@ void pychip_DeviceController_IterateDiscoveredCommissionableNodes(Controller::De } if (dnsSdInfo->commissionData.rotatingIdLen > 0) { - jsonVal["rotatingId"] = std::string(reinterpret_cast(dnsSdInfo->commissionData.rotatingId), - dnsSdInfo->commissionData.rotatingIdLen); + jsonVal["rotatingId"] = rotatingId; } {